Browse Source

Merge pull request #423 from pelias/use_elasticsearch_module

Use the official elasticsearch module
pull/445/head
Julian Simioni 9 years ago
parent
commit
9bc2c69118
  1. 2
      package.json
  2. 4
      src/backend.js

2
package.json

@ -39,6 +39,7 @@
"async": "^1.5.2", "async": "^1.5.2",
"check-types": "^6.0.0", "check-types": "^6.0.0",
"cluster2": "git://github.com/missinglink/cluster2.git#node_zero_twelve", "cluster2": "git://github.com/missinglink/cluster2.git#node_zero_twelve",
"elasticsearch": "^10.1.3",
"express": "^4.8.8", "express": "^4.8.8",
"express-http-proxy": "^0.6.0", "express-http-proxy": "^0.6.0",
"extend": "3.0.0", "extend": "3.0.0",
@ -51,7 +52,6 @@
"markdown": "0.5.0", "markdown": "0.5.0",
"morgan": "1.7.0", "morgan": "1.7.0",
"pelias-config": "^1.0.1", "pelias-config": "^1.0.1",
"pelias-esclient": "1.0.0",
"pelias-logger": "^0.0.8", "pelias-logger": "^0.0.8",
"pelias-query": "^6.0.0", "pelias-query": "^6.0.0",
"pelias-suggester-pipeline": "2.0.4", "pelias-suggester-pipeline": "2.0.4",

4
src/backend.js

@ -1,6 +1,6 @@
var Backend = require('geopipes-elasticsearch-backend'), var Backend = require('geopipes-elasticsearch-backend'),
client = require('pelias-esclient')(), client = require('elasticsearch').Client(),
backends = {}; backends = {};
function getBackend( index, type ){ function getBackend( index, type ){
@ -11,4 +11,4 @@ function getBackend( index, type ){
return backends[key]; return backends[key];
} }
module.exports = getBackend; module.exports = getBackend;

Loading…
Cancel
Save