Browse Source

improve bias for autocomplete, add popularity and localregions bias

improved_bias
Peter Johnson 9 years ago
parent
commit
a0433589dc
  1. 4
      package.json
  2. 4
      query/autocomplete.js
  3. 2
      query/search.js

4
package.json

@ -44,15 +44,15 @@
"geojson-extent": "^0.3.1",
"geolib": "^2.0.18",
"geopipes-elasticsearch-backend": "^0.2.0",
"lodash": "^3.10.1",
"iso3166-1": "^0.2.3",
"lodash": "^3.10.1",
"markdown": "0.5.0",
"microtime": "1.4.0",
"morgan": "1.5.2",
"pelias-config": "^1.0.1",
"pelias-esclient": "0.0.25",
"pelias-logger": "^0.0.8",
"pelias-query": "^1.5.0",
"pelias-query": "^1.6.0",
"pelias-schema": "1.0.0",
"pelias-suggester-pipeline": "2.0.2",
"stats-lite": "^1.0.3",

4
query/autocomplete.js

@ -13,7 +13,9 @@ query.score( peliasQuery.view.ngrams, 'must' );
// scoring boost
query.score( peliasQuery.view.phrase );
query.score( peliasQuery.view.focus );
query.score( peliasQuery.view.focus( peliasQuery.view.ngrams ) );
query.score( peliasQuery.view.popularity(['admin0','admin1','admin2']) );
query.score( peliasQuery.view.localregions(['locality','local_admin','neighborhood']));
// --------------------------------

2
query/search.js

@ -14,7 +14,7 @@ query.score( peliasQuery.view.ngrams, 'must' );
// scoring boost
query.score( peliasQuery.view.phrase );
query.score( peliasQuery.view.focus );
query.score( peliasQuery.view.focus( peliasQuery.view.phrase ) );
// address components
query.score( peliasQuery.view.address('housenumber') );

Loading…
Cancel
Save