|
|
@ -1,6 +1,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
var generate = require('../../../query/sort'); |
|
|
|
var generate = require('../../../query/sort'); |
|
|
|
var population = 'population'; |
|
|
|
var population = 'population'; |
|
|
|
|
|
|
|
var popularity = 'popularity'; |
|
|
|
var weights = require('pelias-suggester-pipeline').weights; |
|
|
|
var weights = require('pelias-suggester-pipeline').weights; |
|
|
|
|
|
|
|
|
|
|
|
module.exports.tests = {}; |
|
|
|
module.exports.tests = {}; |
|
|
@ -20,6 +21,13 @@ var expected = [ |
|
|
|
'order': 'desc' |
|
|
|
'order': 'desc' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
'_script': { |
|
|
|
|
|
|
|
'file': popularity, |
|
|
|
|
|
|
|
'type': 'number', |
|
|
|
|
|
|
|
'order': 'desc' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
'_script': { |
|
|
|
'_script': { |
|
|
|
'params': { |
|
|
|
'params': { |
|
|
|