Browse Source

boosting admin0 values

pull/73/head
Harish Krishna 10 years ago
parent
commit
2d861aea7f
  1. 8
      query/sort.js
  2. 7
      test/unit/query/reverse.js
  3. 7
      test/unit/query/search.js
  4. 7
      test/unit/query/sort.js

8
query/sort.js

@ -1,7 +1,15 @@
var admin_boost = 'admin_boost';
var population = 'population'; var population = 'population';
var weights = require('pelias-suggester-pipeline').weights; var weights = require('pelias-suggester-pipeline').weights;
module.exports = [ module.exports = [
{
'_script': {
'file': admin_boost,
'type': 'number',
'order': 'desc'
}
},
{ {
'_script': { '_script': {
'file': population, 'file': population,

7
test/unit/query/reverse.js

@ -13,6 +13,13 @@ module.exports.tests.interface = function(test, common) {
var sort = [ var sort = [
'_score', '_score',
{
'_script': {
'file': 'admin_boost',
'type': 'number',
'order': 'desc'
}
},
{ {
'_script': { '_script': {
'file': 'population', 'file': 'population',

7
test/unit/query/search.js

@ -13,6 +13,13 @@ module.exports.tests.interface = function(test, common) {
var sort = [ var sort = [
'_score', '_score',
{
'_script': {
'file': 'admin_boost',
'type': 'number',
'order': 'desc'
}
},
{ {
'_script': { '_script': {
'file': 'population', 'file': 'population',

7
test/unit/query/sort.js

@ -13,6 +13,13 @@ module.exports.tests.interface = function(test, common) {
}; };
var expected = [ var expected = [
{
'_script': {
'file': 'admin_boost',
'type': 'number',
'order': 'desc'
}
},
{ {
'_script': { '_script': {
'file': population, 'file': population,

Loading…
Cancel
Save