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': {