Browse Source

removed population/popularity functions from search using ids

pull/912/head
Stephen Hess 8 years ago
parent
commit
99a1868c47
  1. 2
      query/address_search_using_ids.js
  2. 6
      test/unit/query/address_search_using_ids.js

2
query/address_search_using_ids.js

@ -11,8 +11,6 @@ const addressUsingIdsQuery = new peliasQuery.layout.AddressesUsingIdsQuery();
// scoring boost
addressUsingIdsQuery.score( peliasQuery.view.focus_only_function( peliasQuery.view.phrase ) );
addressUsingIdsQuery.score( peliasQuery.view.popularity_only_function );
addressUsingIdsQuery.score( peliasQuery.view.population_only_function );
// --------------------------------
// non-scoring hard filters

6
test/unit/query/address_search_using_ids.js

@ -16,8 +16,6 @@ module.exports.tests.interface = (test, common) => {
// helper for canned views
const views = {
focus_only_function: () => 'focus_only_function',
popularity_only_function: 'popularity_only_function view',
population_only_function: 'population_only_function view',
boundary_country: 'boundary_country view',
boundary_circle: 'boundary_circle view',
boundary_rect: 'boundary_rect view',
@ -59,9 +57,7 @@ module.exports.tests.base_query = (test, common) => {
t.equals(generatedQuery.body.vs.var('size').toString(), 20);
t.deepEquals(generatedQuery.body.score_functions, [
'focus_only_function',
'popularity_only_function view',
'population_only_function view'
'focus_only_function'
]);
t.deepEquals(generatedQuery.body.filter_functions, [

Loading…
Cancel
Save