Skip to content

Commit

Permalink
redone elasticconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbeletsky committed Jul 14, 2014
1 parent 1a8d94c commit a50c160
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
7 changes: 5 additions & 2 deletions config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@ module.exports = {
},

elastic: {
connection: 'http://localhost:9200'
host: {
host: 'http://localhost:9200'
},

requestTimeout: 5000
},

collections: [ {
name: 'items',
index: 'items',
type: 'item',
query: {user: '[email protected]'},
mappings: {
'item': {
'properties': {
Expand Down
5 changes: 1 addition & 4 deletions source/elastic/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
var elasticsearch = require('elasticsearch');

module.exports = function (config) {
var client = elasticsearch.Client({
host: config.elastic.connection,
requestTimeout: 5000
});
var client = elasticsearch.Client(config.elasticsearch);

return client;
};

0 comments on commit a50c160

Please sign in to comment.