From 70e0bf85438592e5c9fbf0393329f77f97122cba Mon Sep 17 00:00:00 2001 From: Harish Krishna Date: Fri, 7 Nov 2014 11:01:47 -0500 Subject: [PATCH] fuzzy: AUTO (moving it back to all suggest queries) --- controller/suggest.js | 9 --------- query/suggest.js | 3 +++ 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/controller/suggest.js b/controller/suggest.js index 8069d8a3..b64a407e 100644 --- a/controller/suggest.js +++ b/controller/suggest.js @@ -95,15 +95,6 @@ function setup( backend, query ){ } } } - - // fuzzy - async_query.fuzzy = function(callback){ - cmd.body = query( req.clean ); - cmd.body.pelias.completion.fuzzy = { - 'fuzziness': 2 - }; - query_backend(cmd, callback); - } async.parallel(async_query, function(err, results) { // results is equal to: {a: docs, b: docs, c: docs} diff --git a/query/suggest.js b/query/suggest.js index 29f2f0b3..75cf1289 100644 --- a/query/suggest.js +++ b/query/suggest.js @@ -25,6 +25,9 @@ function generate( params, precision ){ 'completion' : { 'size' : params.size, 'field' : 'suggest', + 'fuzzy' : { + 'fuzziness' : 'AUTO' + }, 'context': { 'dataset': params.layers, 'location': {