diff --git a/query/component.js b/query/component_geocoding.js similarity index 98% rename from query/component.js rename to query/component_geocoding.js index 5266d8c1..7b58551e 100644 --- a/query/component.js +++ b/query/component_geocoding.js @@ -102,7 +102,7 @@ function generateQuery( clean ){ var q = getQuery(vs); - console.log(JSON.stringify(q.body, null, 2)); + // console.log(JSON.stringify(q.body, null, 2)); return q; } diff --git a/routes/v1.js b/routes/v1.js index a37bef90..75b45ff3 100644 --- a/routes/v1.js +++ b/routes/v1.js @@ -8,7 +8,7 @@ var sanitizers = { place: require('../sanitizer/place'), search: require('../sanitizer/search'), search_fallback: require('../sanitizer/search_fallback'), - component: require('../sanitizer/component'), + component_geocoding: require('../sanitizer/component_geocoding'), reverse: require('../sanitizer/reverse'), nearby: require('../sanitizer/nearby') }; @@ -30,7 +30,7 @@ var controllers = { var queries = { libpostal: require('../query/search'), fallback_to_old_prod: require('../query/search_original'), - component: require('../query/search_component') + component_geocoding: require('../query/component_geocoding') }; /** ----------------------- controllers ----------------------- **/ @@ -96,14 +96,9 @@ function addRoutes(app, peliasConfig) { postProc.sendJSON ]), component: createRouter([ - sanitizers.component.middleware, + sanitizers.component_geocoding.middleware, middleware.calcSize(), - // 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, queries.component), - // sanitizers.search_fallback.middleware, - // controllers.search(peliasConfig, undefined, queries.fallback_to_old_prod), + controllers.search(peliasConfig, undefined, queries.component_geocoding), postProc.trimByGranularityComponent(), postProc.distances('focus.point.'), postProc.confidenceScores(peliasConfig), diff --git a/sanitizer/component.js b/sanitizer/component_geocoding.js similarity index 100% rename from sanitizer/component.js rename to sanitizer/component_geocoding.js diff --git a/test/unit/query/component.js b/test/unit/query/component_geocoding.js similarity index 100% rename from test/unit/query/component.js rename to test/unit/query/component_geocoding.js diff --git a/test/unit/run.js b/test/unit/run.js index abcefd47..64e3e708 100644 --- a/test/unit/run.js +++ b/test/unit/run.js @@ -59,7 +59,7 @@ var tests = [ require('./sanitizer/nearby'), require('./src/backend'), require('./sanitizer/autocomplete'), - require('./sanitizer/component'), + require('./sanitizer/component_geocoding'), require('./sanitizer/place'), require('./sanitizer/reverse'), require('./sanitizer/sanitizeAll'), diff --git a/test/unit/sanitizer/component.js b/test/unit/sanitizer/component_geocoding.js similarity index 97% rename from test/unit/sanitizer/component.js rename to test/unit/sanitizer/component_geocoding.js index 7f9569dc..079f92ba 100644 --- a/test/unit/sanitizer/component.js +++ b/test/unit/sanitizer/component_geocoding.js @@ -8,7 +8,7 @@ module.exports.tests.sanitize = function(test, common) { // rather than re-verify the functionality of all the sanitizers, this test just verifies that they // were all called correctly - var search = proxyquire('../../../sanitizer/component', { + var search = proxyquire('../../../sanitizer/component_geocoding', { '../sanitizer/_deprecate_quattroshapes': function() { called_sanitizers.push('_deprecate_quattroshapes'); return { errors: [], warnings: [] };