Browse Source

add locality to the list of types which are boosted by the sqrt(popularity) view

popularity_boost_locality
Peter Johnson 9 years ago
parent
commit
39d9162b6d
  1. 2
      query/autocomplete.js
  2. 2
      query/search.js
  3. 5
      test/unit/fixture/autocomplete_linguistic_focus.js
  4. 5
      test/unit/fixture/autocomplete_linguistic_focus_null_island.js
  5. 5
      test/unit/fixture/autocomplete_linguistic_only.js
  6. 5
      test/unit/fixture/search_boundary_country.js
  7. 5
      test/unit/fixture/search_full_address.js
  8. 5
      test/unit/fixture/search_linguistic_bbox.js
  9. 5
      test/unit/fixture/search_linguistic_focus.js
  10. 5
      test/unit/fixture/search_linguistic_focus_bbox.js
  11. 5
      test/unit/fixture/search_linguistic_focus_null_island.js
  12. 5
      test/unit/fixture/search_linguistic_only.js
  13. 5
      test/unit/fixture/search_partial_address.js
  14. 5
      test/unit/fixture/search_regions_address.js

2
query/autocomplete.js

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

2
query/search.js

@ -15,7 +15,7 @@ query.score( peliasQuery.view.ngrams, 'must' );
// scoring boost
query.score( peliasQuery.view.phrase );
query.score( peliasQuery.view.focus( peliasQuery.view.phrase ) );
query.score( peliasQuery.view.popularity(['admin0','admin1','admin2']) );
query.score( peliasQuery.view.popularity(['admin0','admin1','admin2','locality']) );
// address components
query.score( peliasQuery.view.address('housenumber') );

5
test/unit/fixture/autocomplete_linguistic_focus.js

@ -81,6 +81,11 @@ module.exports = {
'type': {
'value': 'admin2'
}
},
{
'type': {
'value': 'locality'
}
}
]
},

5
test/unit/fixture/autocomplete_linguistic_focus_null_island.js

@ -81,6 +81,11 @@ module.exports = {
'type': {
'value': 'admin2'
}
},
{
'type': {
'value': 'locality'
}
}
]
},

5
test/unit/fixture/autocomplete_linguistic_only.js

@ -54,6 +54,11 @@ module.exports = {
'type': {
'value': 'admin2'
}
},
{
'type': {
'value': 'locality'
}
}
]
},

5
test/unit/fixture/search_boundary_country.js

@ -64,6 +64,11 @@ module.exports = {
'type': {
'value': 'admin2'
}
},
{
'type': {
'value': 'locality'
}
}
]
},

5
test/unit/fixture/search_full_address.js

@ -57,6 +57,11 @@ module.exports = {
'type': {
'value': 'admin2'
}
},
{
'type': {
'value': 'locality'
}
}
]
},

5
test/unit/fixture/search_linguistic_bbox.js

@ -54,6 +54,11 @@ module.exports = {
'type': {
'value': 'admin2'
}
},
{
'type': {
'value': 'locality'
}
}
]
},

5
test/unit/fixture/search_linguistic_focus.js

@ -83,6 +83,11 @@ module.exports = {
'type': {
'value': 'admin2'
}
},
{
'type': {
'value': 'locality'
}
}
]
},

5
test/unit/fixture/search_linguistic_focus_bbox.js

@ -83,6 +83,11 @@ module.exports = {
'type': {
'value': 'admin2'
}
},
{
'type': {
'value': 'locality'
}
}
]
},

5
test/unit/fixture/search_linguistic_focus_null_island.js

@ -83,6 +83,11 @@ module.exports = {
'type': {
'value': 'admin2'
}
},
{
'type': {
'value': 'locality'
}
}
]
},

5
test/unit/fixture/search_linguistic_only.js

@ -54,6 +54,11 @@ module.exports = {
'type': {
'value': 'admin2'
}
},
{
'type': {
'value': 'locality'
}
}
]
},

5
test/unit/fixture/search_partial_address.js

@ -57,6 +57,11 @@ module.exports = {
'type': {
'value': 'admin2'
}
},
{
'type': {
'value': 'locality'
}
}
]
},

5
test/unit/fixture/search_regions_address.js

@ -57,6 +57,11 @@ module.exports = {
'type': {
'value': 'admin2'
}
},
{
'type': {
'value': 'locality'
}
}
]
},

Loading…
Cancel
Save