Browse Source

feat: Merge pull request #844 from pelias/greenkeeper/pelias-query-8.16.0

Update pelias-query to the latest version 🚀
pull/846/head v3.22.0
Julian Simioni 8 years ago committed by GitHub
parent
commit
1edb481893
  1. 2
      package.json
  2. 40
      test/unit/fixture/search_boundary_country.js
  3. 1593
      test/unit/fixture/search_fallback.js
  4. 49
      test/unit/fixture/search_fallback_postalcode_only.js
  5. 40
      test/unit/fixture/search_linguistic_bbox.js
  6. 40
      test/unit/fixture/search_linguistic_focus.js
  7. 40
      test/unit/fixture/search_linguistic_focus_bbox.js
  8. 40
      test/unit/fixture/search_linguistic_focus_null_island.js
  9. 40
      test/unit/fixture/search_linguistic_only.js
  10. 40
      test/unit/fixture/search_linguistic_viewport.js
  11. 40
      test/unit/fixture/search_linguistic_viewport_min_diagonal.js
  12. 40
      test/unit/fixture/search_with_category_filtering.js
  13. 40
      test/unit/fixture/search_with_source_filtering.js
  14. 8
      test/unit/fixture/structured_geocoding/boundary_country.json
  15. 1595
      test/unit/fixture/structured_geocoding/fallback.json
  16. 8
      test/unit/fixture/structured_geocoding/linguistic_bbox.json
  17. 8
      test/unit/fixture/structured_geocoding/linguistic_focus.json
  18. 8
      test/unit/fixture/structured_geocoding/linguistic_focus_bbox.json
  19. 8
      test/unit/fixture/structured_geocoding/linguistic_focus_null_island.json
  20. 8
      test/unit/fixture/structured_geocoding/linguistic_only.json
  21. 8
      test/unit/fixture/structured_geocoding/linguistic_viewport.json
  22. 8
      test/unit/fixture/structured_geocoding/linguistic_viewport_min_diagonal.json
  23. 49
      test/unit/fixture/structured_geocoding/postalcode_only.js
  24. 9
      test/unit/fixture/structured_geocoding/with_source_filtering.json

2
package.json

@ -61,7 +61,7 @@
"pelias-logger": "0.2.0", "pelias-logger": "0.2.0",
"pelias-mock-logger": "^1.0.1", "pelias-mock-logger": "^1.0.1",
"pelias-model": "4.6.0", "pelias-model": "4.6.0",
"pelias-query": "8.15.0", "pelias-query": "8.16.0",
"pelias-text-analyzer": "1.7.3", "pelias-text-analyzer": "1.7.3",
"predicates": "^1.0.1", "predicates": "^1.0.1",
"retry": "^0.10.1", "retry": "^0.10.1",

40
test/unit/fixture/search_boundary_country.js

@ -2,32 +2,28 @@ module.exports = {
'query': { 'query': {
'function_score': { 'function_score': {
'query': { 'query': {
'filtered': { 'bool': {
'query': { 'should': [
'bool': { {
'should': [ 'bool': {
{ '_name': 'fallback.street',
'bool': { 'boost': 5,
'_name': 'fallback.street', 'must': [
'boost': 5, {
'must': [ 'match_phrase': {
{ 'address_parts.street': 'street value'
'match_phrase': {
'address_parts.street': 'street value'
}
}
],
'should': [],
'filter': {
'term': {
'layer': 'street'
}
} }
} }
],
'should': [],
'filter': {
'term': {
'layer': 'street'
}
} }
] }
} }
}, ],
'filter': { 'filter': {
'bool': { 'bool': {
'must': [ 'must': [

1593
test/unit/fixture/search_fallback.js

File diff suppressed because it is too large Load Diff

49
test/unit/fixture/search_fallback_postalcode_only.js

@ -2,39 +2,30 @@ module.exports = {
'query': { 'query': {
'function_score': { 'function_score': {
'query': { 'query': {
'filtered': { 'bool': {
'query': { 'should': [
'bool': { {
'should': [ 'bool': {
{ '_name': 'fallback.postalcode',
'bool': { 'must': [
'_name': 'fallback.postalcode', {
'must': [ 'multi_match': {
{ 'query': '90210',
'multi_match': { 'type': 'phrase',
'query': '90210', 'fields': [
'type': 'phrase', 'parent.postalcode'
'fields': [ ]
'parent.postalcode'
]
}
}
],
'filter': {
'term': {
'layer': 'postalcode'
}
} }
} }
],
'filter': {
'term': {
'layer': 'postalcode'
}
} }
] }
}
},
'filter': {
'bool': {
'must': []
} }
} ]
} }
}, },
'max_boost': 20, 'max_boost': 20,

40
test/unit/fixture/search_linguistic_bbox.js

@ -2,32 +2,28 @@ module.exports = {
'query': { 'query': {
'function_score': { 'function_score': {
'query': { 'query': {
'filtered': { 'bool': {
'query': { 'should': [
'bool': { {
'should': [ 'bool': {
{ '_name': 'fallback.street',
'bool': { 'boost': 5,
'_name': 'fallback.street', 'must': [
'boost': 5, {
'must': [ 'match_phrase': {
{ 'address_parts.street': 'street value'
'match_phrase': {
'address_parts.street': 'street value'
}
}
],
'should': [],
'filter': {
'term': {
'layer': 'street'
}
} }
} }
],
'should': [],
'filter': {
'term': {
'layer': 'street'
}
} }
] }
} }
}, ],
'filter': { 'filter': {
'bool': { 'bool': {
'must': [ 'must': [

40
test/unit/fixture/search_linguistic_focus.js

@ -2,32 +2,28 @@ module.exports = {
'query': { 'query': {
'function_score': { 'function_score': {
'query': { 'query': {
'filtered': { 'bool': {
'query': { 'should': [
'bool': { {
'should': [ 'bool': {
{ '_name': 'fallback.street',
'bool': { 'boost': 5,
'_name': 'fallback.street', 'must': [
'boost': 5, {
'must': [ 'match_phrase': {
{ 'address_parts.street': 'street value'
'match_phrase': {
'address_parts.street': 'street value'
}
}
],
'should': [],
'filter': {
'term': {
'layer': 'street'
}
} }
} }
],
'should': [],
'filter': {
'term': {
'layer': 'street'
}
} }
] }
} }
}, ],
'filter': { 'filter': {
'bool': { 'bool': {
'must': [ 'must': [

40
test/unit/fixture/search_linguistic_focus_bbox.js

@ -2,32 +2,28 @@ module.exports = {
'query': { 'query': {
'function_score': { 'function_score': {
'query': { 'query': {
'filtered': { 'bool': {
'query': { 'should': [
'bool': { {
'should': [ 'bool': {
{ '_name': 'fallback.street',
'bool': { 'boost': 5,
'_name': 'fallback.street', 'must': [
'boost': 5, {
'must': [ 'match_phrase': {
{ 'address_parts.street': 'street value'
'match_phrase': {
'address_parts.street': 'street value'
}
}
],
'should': [],
'filter': {
'term': {
'layer': 'street'
}
} }
} }
],
'should': [],
'filter': {
'term': {
'layer': 'street'
}
} }
] }
} }
}, ],
'filter': { 'filter': {
'bool': { 'bool': {
'must': [ 'must': [

40
test/unit/fixture/search_linguistic_focus_null_island.js

@ -2,32 +2,28 @@ module.exports = {
'query': { 'query': {
'function_score': { 'function_score': {
'query': { 'query': {
'filtered': { 'bool': {
'query': { 'should': [
'bool': { {
'should': [ 'bool': {
{ '_name': 'fallback.street',
'bool': { 'boost': 5,
'_name': 'fallback.street', 'must': [
'boost': 5, {
'must': [ 'match_phrase': {
{ 'address_parts.street': 'street value'
'match_phrase': {
'address_parts.street': 'street value'
}
}
],
'should': [],
'filter': {
'term': {
'layer': 'street'
}
} }
} }
],
'should': [],
'filter': {
'term': {
'layer': 'street'
}
} }
] }
} }
}, ],
'filter': { 'filter': {
'bool': { 'bool': {
'must': [ 'must': [

40
test/unit/fixture/search_linguistic_only.js

@ -2,32 +2,28 @@ module.exports = {
'query': { 'query': {
'function_score': { 'function_score': {
'query': { 'query': {
'filtered': { 'bool': {
'query': { 'should': [
'bool': { {
'should': [ 'bool': {
{ '_name': 'fallback.street',
'bool': { 'boost': 5,
'_name': 'fallback.street', 'must': [
'boost': 5, {
'must': [ 'match_phrase': {
{ 'address_parts.street': 'street value'
'match_phrase': {
'address_parts.street': 'street value'
}
}
],
'should': [],
'filter': {
'term': {
'layer': 'street'
}
} }
} }
],
'should': [],
'filter': {
'term': {
'layer': 'street'
}
} }
] }
} }
}, ],
'filter': { 'filter': {
'bool': { 'bool': {
'must': [ 'must': [

40
test/unit/fixture/search_linguistic_viewport.js

@ -2,32 +2,28 @@ module.exports = {
'query': { 'query': {
'function_score': { 'function_score': {
'query': { 'query': {
'filtered': { 'bool': {
'query': { 'should': [
'bool': { {
'should': [ 'bool': {
{ '_name': 'fallback.street',
'bool': { 'boost': 5,
'_name': 'fallback.street', 'must': [
'boost': 5, {
'must': [ 'match_phrase': {
{ 'address_parts.street': 'street value'
'match_phrase': {
'address_parts.street': 'street value'
}
}
],
'should': [],
'filter': {
'term': {
'layer': 'street'
}
} }
} }
],
'should': [],
'filter': {
'term': {
'layer': 'street'
}
} }
] }
} }
}, ],
'filter': { 'filter': {
'bool': { 'bool': {
'must': [ 'must': [

40
test/unit/fixture/search_linguistic_viewport_min_diagonal.js

@ -2,32 +2,28 @@ module.exports = {
'query': { 'query': {
'function_score': { 'function_score': {
'query': { 'query': {
'filtered': { 'bool': {
'query': { 'should': [
'bool': { {
'should': [ 'bool': {
{ '_name': 'fallback.street',
'bool': { 'boost': 5,
'_name': 'fallback.street', 'must': [
'boost': 5, {
'must': [ 'match_phrase': {
{ 'address_parts.street': 'street value'
'match_phrase': {
'address_parts.street': 'street value'
}
}
],
'should': [],
'filter': {
'term': {
'layer': 'street'
}
} }
} }
],
'should': [],
'filter': {
'term': {
'layer': 'street'
}
} }
] }
} }
}, ],
'filter': { 'filter': {
'bool': { 'bool': {
'must': [ 'must': [

40
test/unit/fixture/search_with_category_filtering.js

@ -2,32 +2,28 @@ module.exports = {
'query': { 'query': {
'function_score': { 'function_score': {
'query': { 'query': {
'filtered': { 'bool': {
'query': { 'should': [
'bool': { {
'should': [ 'bool': {
{ '_name': 'fallback.street',
'bool': { 'boost': 5,
'_name': 'fallback.street', 'must': [
'boost': 5, {
'must': [ 'match_phrase': {
{ 'address_parts.street': 'street value'
'match_phrase': {
'address_parts.street': 'street value'
}
}
],
'should': [],
'filter': {
'term': {
'layer': 'street'
}
} }
} }
],
'should': [],
'filter': {
'term': {
'layer': 'street'
}
} }
] }
} }
}, ],
'filter': { 'filter': {
'bool': { 'bool': {
'must': [ 'must': [

40
test/unit/fixture/search_with_source_filtering.js

@ -2,32 +2,28 @@ module.exports = {
'query': { 'query': {
'function_score': { 'function_score': {
'query': { 'query': {
'filtered': { 'bool': {
'query': { 'should': [
'bool': { {
'should': [ 'bool': {
{ '_name': 'fallback.street',
'bool': { 'boost': 5,
'_name': 'fallback.street', 'must': [
'boost': 5, {
'must': [ 'match_phrase': {
{ 'address_parts.street': 'street value'
'match_phrase': {
'address_parts.street': 'street value'
}
}
],
'should': [],
'filter': {
'term': {
'layer': 'street'
}
} }
} }
],
'should': [],
'filter': {
'term': {
'layer': 'street'
}
} }
] }
} }
}, ],
'filter': { 'filter': {
'bool': { 'bool': {
'must': [ 'must': [

8
test/unit/fixture/structured_geocoding/boundary_country.json

@ -2,12 +2,8 @@
"query": { "query": {
"function_score": { "function_score": {
"query": { "query": {
"filtered": { "bool": {
"query": { "should": [],
"bool": {
"should": []
}
},
"filter": { "filter": {
"bool": { "bool": {
"must": [ "must": [

1595
test/unit/fixture/structured_geocoding/fallback.json

File diff suppressed because it is too large Load Diff

8
test/unit/fixture/structured_geocoding/linguistic_bbox.json

@ -2,12 +2,8 @@
"query": { "query": {
"function_score": { "function_score": {
"query": { "query": {
"filtered": { "bool": {
"query": { "should": [],
"bool": {
"should": []
}
},
"filter": { "filter": {
"bool": { "bool": {
"must": [ "must": [

8
test/unit/fixture/structured_geocoding/linguistic_focus.json

@ -2,12 +2,8 @@
"query": { "query": {
"function_score": { "function_score": {
"query": { "query": {
"filtered": { "bool": {
"query": { "should": [],
"bool": {
"should": []
}
},
"filter": { "filter": {
"bool": { "bool": {
"must": [ "must": [

8
test/unit/fixture/structured_geocoding/linguistic_focus_bbox.json

@ -2,12 +2,8 @@
"query": { "query": {
"function_score": { "function_score": {
"query": { "query": {
"filtered": { "bool": {
"query": { "should": [],
"bool": {
"should": []
}
},
"filter": { "filter": {
"bool": { "bool": {
"must": [ "must": [

8
test/unit/fixture/structured_geocoding/linguistic_focus_null_island.json

@ -2,12 +2,8 @@
"query": { "query": {
"function_score": { "function_score": {
"query": { "query": {
"filtered": { "bool": {
"query": { "should": [],
"bool": {
"should": []
}
},
"filter": { "filter": {
"bool": { "bool": {
"must": [ "must": [

8
test/unit/fixture/structured_geocoding/linguistic_only.json

@ -2,12 +2,8 @@
"query": { "query": {
"function_score": { "function_score": {
"query": { "query": {
"filtered": { "bool": {
"query": { "should": [],
"bool": {
"should": []
}
},
"filter": { "filter": {
"bool": { "bool": {
"must": [ "must": [

8
test/unit/fixture/structured_geocoding/linguistic_viewport.json

@ -2,12 +2,8 @@
"query": { "query": {
"function_score": { "function_score": {
"query": { "query": {
"filtered": { "bool": {
"query": { "should": [],
"bool": {
"should": []
}
},
"filter": { "filter": {
"bool": { "bool": {
"must": [ "must": [

8
test/unit/fixture/structured_geocoding/linguistic_viewport_min_diagonal.json

@ -2,12 +2,8 @@
"query": { "query": {
"function_score": { "function_score": {
"query": { "query": {
"filtered": { "bool": {
"query": { "should": [],
"bool": {
"should": []
}
},
"filter": { "filter": {
"bool": { "bool": {
"must": [ "must": [

49
test/unit/fixture/structured_geocoding/postalcode_only.js

@ -2,39 +2,30 @@ module.exports = {
'query': { 'query': {
'function_score': { 'function_score': {
'query': { 'query': {
'filtered': { 'bool': {
'query': { 'should': [
'bool': { {
'should': [ 'bool': {
{ '_name': 'fallback.postalcode',
'bool': { 'must': [
'_name': 'fallback.postalcode', {
'must': [ 'multi_match': {
{ 'query': 'postalcode value',
'multi_match': { 'type': 'phrase',
'query': 'postalcode value', 'fields': [
'type': 'phrase', 'parent.postalcode'
'fields': [ ]
'parent.postalcode'
]
}
}
],
'filter': {
'term': {
'layer': 'postalcode'
}
} }
} }
],
'filter': {
'term': {
'layer': 'postalcode'
}
} }
] }
}
},
'filter': {
'bool': {
'must': []
} }
} ]
} }
}, },
'max_boost': 20, 'max_boost': 20,

9
test/unit/fixture/structured_geocoding/with_source_filtering.json

@ -2,12 +2,9 @@
"query": { "query": {
"function_score": { "function_score": {
"query": { "query": {
"filtered": { "bool": {
"query": { "should": [
"bool": { ],
"should": []
}
},
"filter": { "filter": {
"bool": { "bool": {
"must": [ "must": [

Loading…
Cancel
Save