Browse Source

Tweak weights for focus

wof_focus_weighting
missinglink 9 years ago committed by Julian Simioni
parent
commit
f133794e0f
  1. 6
      query/autocomplete_defaults.js
  2. 2
      test/unit/fixture/autocomplete_linguistic_final_token.js
  3. 6
      test/unit/fixture/autocomplete_linguistic_focus.js
  4. 6
      test/unit/fixture/autocomplete_linguistic_focus_null_island.js
  5. 2
      test/unit/fixture/autocomplete_linguistic_multiple_tokens.js
  6. 2
      test/unit/fixture/autocomplete_linguistic_only.js
  7. 2
      test/unit/fixture/autocomplete_linguistic_with_admin.js

6
query/autocomplete_defaults.js

@ -30,10 +30,10 @@ module.exports = _.merge({}, peliasQuery.defaults, {
'phrase:slop': 2, 'phrase:slop': 2,
'focus:function': 'linear', 'focus:function': 'linear',
'focus:offset': '10km', 'focus:offset': '0km',
'focus:scale': '250km', 'focus:scale': '250km',
'focus:decay': 0.5, 'focus:decay': 0.5,
'focus:weight': 3, 'focus:weight': 10,
'function_score:score_mode': 'avg', 'function_score:score_mode': 'avg',
'function_score:boost_mode': 'multiply', 'function_score:boost_mode': 'multiply',
@ -90,6 +90,6 @@ module.exports = _.merge({}, peliasQuery.defaults, {
'population:field': 'population', 'population:field': 'population',
'population:modifier': 'log1p', 'population:modifier': 'log1p',
'population:max_boost': 20, 'population:max_boost': 20,
'population:weight': 2 'population:weight': 3
}); });

2
test/unit/fixture/autocomplete_linguistic_final_token.js

@ -70,7 +70,7 @@ module.exports = {
'modifier': 'log1p', 'modifier': 'log1p',
'field': 'population' 'field': 'population'
}, },
'weight': 2 'weight': 3
}] }]
} }
}] }]

6
test/unit/fixture/autocomplete_linguistic_focus.js

@ -35,12 +35,12 @@ module.exports = {
'lat': 29.49136, 'lat': 29.49136,
'lon': -82.50622 'lon': -82.50622
}, },
'offset': '10km', 'offset': '0km',
'scale': '250km', 'scale': '250km',
'decay': 0.5 'decay': 0.5
} }
}, },
'weight': 3 'weight': 10
}], }],
'score_mode': 'avg', 'score_mode': 'avg',
'boost_mode': 'multiply', 'boost_mode': 'multiply',
@ -114,7 +114,7 @@ module.exports = {
'modifier': 'log1p', 'modifier': 'log1p',
'field': 'population' 'field': 'population'
}, },
'weight': 2 'weight': 3
}] }]
} }
}] }]

6
test/unit/fixture/autocomplete_linguistic_focus_null_island.js

@ -35,12 +35,12 @@ module.exports = {
'lat': 0, 'lat': 0,
'lon': 0 'lon': 0
}, },
'offset': '10km', 'offset': '0km',
'scale': '250km', 'scale': '250km',
'decay': 0.5 'decay': 0.5
} }
}, },
'weight': 3 'weight': 10
}], }],
'score_mode': 'avg', 'score_mode': 'avg',
'boost_mode': 'multiply', 'boost_mode': 'multiply',
@ -114,7 +114,7 @@ module.exports = {
'modifier': 'log1p', 'modifier': 'log1p',
'field': 'population' 'field': 'population'
}, },
'weight': 2 'weight': 3
}] }]
} }
}] }]

2
test/unit/fixture/autocomplete_linguistic_multiple_tokens.js

@ -81,7 +81,7 @@ module.exports = {
'modifier': 'log1p', 'modifier': 'log1p',
'field': 'population' 'field': 'population'
}, },
'weight': 2 'weight': 3
}] }]
} }
}] }]

2
test/unit/fixture/autocomplete_linguistic_only.js

@ -70,7 +70,7 @@ module.exports = {
'modifier': 'log1p', 'modifier': 'log1p',
'field': 'population' 'field': 'population'
}, },
'weight': 2 'weight': 3
}] }]
} }
}] }]

2
test/unit/fixture/autocomplete_linguistic_with_admin.js

@ -133,7 +133,7 @@ module.exports = {
'modifier': 'log1p', 'modifier': 'log1p',
'field': 'population' 'field': 'population'
}, },
'weight': 2 'weight': 3
} }
], ],
'score_mode': 'first', 'score_mode': 'first',

Loading…
Cancel
Save