Browse Source

fuzzy: AUTO (moving it back to all suggest queries)

fuzzy
Harish Krishna 10 years ago
parent
commit
70e0bf8543
  1. 9
      controller/suggest.js
  2. 3
      query/suggest.js

9
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}

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

Loading…
Cancel
Save