Browse Source

added `boost:address` and `boost:street` to search defaults

bumped query version to 8.8.0
defaults are `10` and `5`, respectively
pull/701/head
Stephen Hess 8 years ago
parent
commit
7555095399
  1. 2
      package.json
  2. 5
      query/search_defaults.js
  3. 11
      test/unit/fixture/search_boundary_country.js
  4. 12
      test/unit/fixture/search_fallback.js
  5. 11
      test/unit/fixture/search_linguistic_bbox.js
  6. 11
      test/unit/fixture/search_linguistic_focus.js
  7. 11
      test/unit/fixture/search_linguistic_focus_bbox.js
  8. 11
      test/unit/fixture/search_linguistic_focus_null_island.js
  9. 11
      test/unit/fixture/search_linguistic_only.js
  10. 11
      test/unit/fixture/search_linguistic_viewport.js
  11. 11
      test/unit/fixture/search_linguistic_viewport_min_diagonal.js
  12. 11
      test/unit/fixture/search_with_category_filtering.js
  13. 11
      test/unit/fixture/search_with_source_filtering.js

2
package.json

@ -55,7 +55,7 @@
"pelias-config": "2.3.0", "pelias-config": "2.3.0",
"pelias-logger": "0.1.0", "pelias-logger": "0.1.0",
"pelias-model": "4.3.0", "pelias-model": "4.3.0",
"pelias-query": "8.7.0", "pelias-query": "8.8.0",
"pelias-text-analyzer": "1.4.0", "pelias-text-analyzer": "1.4.0",
"stats-lite": "2.0.3", "stats-lite": "2.0.3",
"through2": "2.0.1" "through2": "2.0.1"

5
query/search_defaults.js

@ -92,6 +92,9 @@ 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': 2,
'boost:address': 10,
'boost:street': 5
}); });

11
test/unit/fixture/search_boundary_country.js

@ -9,6 +9,7 @@ module.exports = {
{ {
'bool': { 'bool': {
'_name': 'fallback.street', '_name': 'fallback.street',
'boost': 5,
'must': [ 'must': [
{ {
'match_phrase': { 'match_phrase': {
@ -76,16 +77,6 @@ module.exports = {
'size': 50, 'size': 50,
'track_scores': true, 'track_scores': true,
'sort': [ 'sort': [
{
'population': {
'order': 'desc'
}
},
{
'popularity': {
'order': 'desc'
}
},
'_score' '_score'
] ]
}; };

12
test/unit/fixture/search_fallback.js

@ -98,6 +98,7 @@ module.exports = {
{ {
'bool': { 'bool': {
'_name': 'fallback.address', '_name': 'fallback.address',
'boost': 10,
'must': [ 'must': [
{ {
'match_phrase': { 'match_phrase': {
@ -195,6 +196,7 @@ module.exports = {
{ {
'bool': { 'bool': {
'_name': 'fallback.street', '_name': 'fallback.street',
'boost': 5,
'must': [ 'must': [
{ {
'match_phrase': { 'match_phrase': {
@ -790,16 +792,6 @@ module.exports = {
'size': 20, 'size': 20,
'track_scores': true, 'track_scores': true,
'sort': [ 'sort': [
{
'population': {
'order': 'desc'
}
},
{
'popularity': {
'order': 'desc'
}
},
'_score' '_score'
] ]
}; };

11
test/unit/fixture/search_linguistic_bbox.js

@ -9,6 +9,7 @@ module.exports = {
{ {
'bool': { 'bool': {
'_name': 'fallback.street', '_name': 'fallback.street',
'boost': 5,
'must': [ 'must': [
{ {
'match_phrase': { 'match_phrase': {
@ -79,16 +80,6 @@ module.exports = {
'size': 50, 'size': 50,
'track_scores': true, 'track_scores': true,
'sort': [ 'sort': [
{
'population': {
'order': 'desc'
}
},
{
'popularity': {
'order': 'desc'
}
},
'_score' '_score'
] ]
}; };

11
test/unit/fixture/search_linguistic_focus.js

@ -9,6 +9,7 @@ module.exports = {
{ {
'bool': { 'bool': {
'_name': 'fallback.street', '_name': 'fallback.street',
'boost': 5,
'must': [ 'must': [
{ {
'match_phrase': { 'match_phrase': {
@ -82,16 +83,6 @@ module.exports = {
'size': 50, 'size': 50,
'track_scores': true, 'track_scores': true,
'sort': [ 'sort': [
{
'population': {
'order': 'desc'
}
},
{
'popularity': {
'order': 'desc'
}
},
'_score' '_score'
] ]
}; };

11
test/unit/fixture/search_linguistic_focus_bbox.js

@ -9,6 +9,7 @@ module.exports = {
{ {
'bool': { 'bool': {
'_name': 'fallback.street', '_name': 'fallback.street',
'boost': 5,
'must': [ 'must': [
{ {
'match_phrase': { 'match_phrase': {
@ -93,16 +94,6 @@ module.exports = {
'size': 50, 'size': 50,
'track_scores': true, 'track_scores': true,
'sort': [ 'sort': [
{
'population': {
'order': 'desc'
}
},
{
'popularity': {
'order': 'desc'
}
},
'_score' '_score'
] ]
}; };

11
test/unit/fixture/search_linguistic_focus_null_island.js

@ -9,6 +9,7 @@ module.exports = {
{ {
'bool': { 'bool': {
'_name': 'fallback.street', '_name': 'fallback.street',
'boost': 5,
'must': [ 'must': [
{ {
'match_phrase': { 'match_phrase': {
@ -82,16 +83,6 @@ module.exports = {
'size': 50, 'size': 50,
'track_scores': true, 'track_scores': true,
'sort': [ 'sort': [
{
'population': {
'order': 'desc'
}
},
{
'popularity': {
'order': 'desc'
}
},
'_score' '_score'
] ]
}; };

11
test/unit/fixture/search_linguistic_only.js

@ -9,6 +9,7 @@ module.exports = {
{ {
'bool': { 'bool': {
'_name': 'fallback.street', '_name': 'fallback.street',
'boost': 5,
'must': [ 'must': [
{ {
'match_phrase': { 'match_phrase': {
@ -68,16 +69,6 @@ module.exports = {
'size': 50, 'size': 50,
'track_scores': true, 'track_scores': true,
'sort': [ 'sort': [
{
'population': {
'order': 'desc'
}
},
{
'popularity': {
'order': 'desc'
}
},
'_score' '_score'
] ]
}; };

11
test/unit/fixture/search_linguistic_viewport.js

@ -9,6 +9,7 @@ module.exports = {
{ {
'bool': { 'bool': {
'_name': 'fallback.street', '_name': 'fallback.street',
'boost': 5,
'must': [ 'must': [
{ {
'match_phrase': { 'match_phrase': {
@ -68,16 +69,6 @@ module.exports = {
'size': 50, 'size': 50,
'track_scores': true, 'track_scores': true,
'sort': [ 'sort': [
{
'population': {
'order': 'desc'
}
},
{
'popularity': {
'order': 'desc'
}
},
'_score' '_score'
] ]
}; };

11
test/unit/fixture/search_linguistic_viewport_min_diagonal.js

@ -9,6 +9,7 @@ module.exports = {
{ {
'bool': { 'bool': {
'_name': 'fallback.street', '_name': 'fallback.street',
'boost': 5,
'must': [ 'must': [
{ {
'match_phrase': { 'match_phrase': {
@ -68,16 +69,6 @@ module.exports = {
'size': 50, 'size': 50,
'track_scores': true, 'track_scores': true,
'sort': [ 'sort': [
{
'population': {
'order': 'desc'
}
},
{
'popularity': {
'order': 'desc'
}
},
'_score' '_score'
] ]
}; };

11
test/unit/fixture/search_with_category_filtering.js

@ -9,6 +9,7 @@ module.exports = {
{ {
'bool': { 'bool': {
'_name': 'fallback.street', '_name': 'fallback.street',
'boost': 5,
'must': [ 'must': [
{ {
'match_phrase': { 'match_phrase': {
@ -69,16 +70,6 @@ module.exports = {
'size': 20, 'size': 20,
'track_scores': true, 'track_scores': true,
'sort': [ 'sort': [
{
'population': {
'order': 'desc'
}
},
{
'popularity': {
'order': 'desc'
}
},
'_score' '_score'
] ]
}; };

11
test/unit/fixture/search_with_source_filtering.js

@ -9,6 +9,7 @@ module.exports = {
{ {
'bool': { 'bool': {
'_name': 'fallback.street', '_name': 'fallback.street',
'boost': 5,
'must': [ 'must': [
{ {
'match_phrase': { 'match_phrase': {
@ -68,16 +69,6 @@ module.exports = {
'size': 20, 'size': 20,
'track_scores': true, 'track_scores': true,
'sort': [ 'sort': [
{
'population': {
'order': 'desc'
}
},
{
'popularity': {
'order': 'desc'
}
},
'_score' '_score'
] ]
}; };

Loading…
Cancel
Save