Browse Source

extracted variables to conform to convention

pull/666/head
Stephen Hess 8 years ago
parent
commit
ae37add82b
  1. 9
      routes/v1.js

9
routes/v1.js

@ -26,6 +26,11 @@ var controllers = {
status: require('../controller/status')
};
var queries = {
libpostal: require('../query/search'),
fallback_to_old_prod: require('../query/search_original')
};
/** ----------------------- controllers ----------------------- **/
var postProc = {
@ -67,9 +72,9 @@ function addRoutes(app, peliasConfig) {
// 2nd parameter is `backend` which gets initialized internally
// 3rd parameter is which query module to use, use fallback/geodisambiguation
// first, then use original search strategy if first query didn't return anything
controllers.search(peliasConfig, undefined, require('../query/search')),
controllers.search(peliasConfig, undefined, queries.libpostal),
sanitisers.search_fallback.middleware,
controllers.search(peliasConfig, undefined, require('../query/search_original')),
controllers.search(peliasConfig, undefined, queries.fallback_to_old_prod),
postProc.trimByGranularity(),
postProc.distances('focus.point.'),
postProc.confidenceScores(peliasConfig),

Loading…
Cancel
Save