Browse Source

Revert "Update pelias-query to the latest version 🚀"

pull/855/head
Julian Simioni 8 years ago committed by GitHub
parent
commit
6014786162
  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. 10
      test/unit/fixture/structured_geocoding/boundary_country.json
  15. 1595
      test/unit/fixture/structured_geocoding/fallback.json
  16. 10
      test/unit/fixture/structured_geocoding/linguistic_bbox.json
  17. 10
      test/unit/fixture/structured_geocoding/linguistic_focus.json
  18. 8
      test/unit/fixture/structured_geocoding/linguistic_focus_bbox.json
  19. 10
      test/unit/fixture/structured_geocoding/linguistic_focus_null_island.json
  20. 10
      test/unit/fixture/structured_geocoding/linguistic_only.json
  21. 10
      test/unit/fixture/structured_geocoding/linguistic_viewport.json
  22. 10
      test/unit/fixture/structured_geocoding/linguistic_viewport_min_diagonal.json
  23. 49
      test/unit/fixture/structured_geocoding/postalcode_only.js
  24. 11
      test/unit/fixture/structured_geocoding/with_source_filtering.json

2
package.json

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

40
test/unit/fixture/search_boundary_country.js

@ -2,28 +2,32 @@ module.exports = {
'query': {
'function_score': {
'query': {
'bool': {
'should': [
{
'bool': {
'_name': 'fallback.street',
'boost': 5,
'must': [
{
'match_phrase': {
'address_parts.street': 'street value'
'filtered': {
'query': {
'bool': {
'should': [
{
'bool': {
'_name': 'fallback.street',
'boost': 5,
'must': [
{
'match_phrase': {
'address_parts.street': 'street value'
}
}
],
'should': [],
'filter': {
'term': {
'layer': 'street'
}
}
}
],
'should': [],
'filter': {
'term': {
'layer': 'street'
}
}
}
]
}
],
},
'filter': {
'bool': {
'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,30 +2,39 @@ module.exports = {
'query': {
'function_score': {
'query': {
'bool': {
'should': [
{
'bool': {
'_name': 'fallback.postalcode',
'must': [
{
'multi_match': {
'query': '90210',
'type': 'phrase',
'fields': [
'parent.postalcode'
]
'filtered': {
'query': {
'bool': {
'should': [
{
'bool': {
'_name': 'fallback.postalcode',
'must': [
{
'multi_match': {
'query': '90210',
'type': 'phrase',
'fields': [
'parent.postalcode'
]
}
}
],
'filter': {
'term': {
'layer': 'postalcode'
}
}
}
],
'filter': {
'term': {
'layer': 'postalcode'
}
}
}
]
}
},
'filter': {
'bool': {
'must': []
}
]
}
}
},
'max_boost': 20,

40
test/unit/fixture/search_linguistic_bbox.js

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

40
test/unit/fixture/search_linguistic_focus.js

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

40
test/unit/fixture/search_linguistic_focus_bbox.js

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

40
test/unit/fixture/search_linguistic_focus_null_island.js

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

40
test/unit/fixture/search_linguistic_only.js

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

40
test/unit/fixture/search_linguistic_viewport.js

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

40
test/unit/fixture/search_linguistic_viewport_min_diagonal.js

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

40
test/unit/fixture/search_with_category_filtering.js

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

40
test/unit/fixture/search_with_source_filtering.js

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

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

@ -2,8 +2,12 @@
"query": {
"function_score": {
"query": {
"bool": {
"should": [],
"filtered": {
"query": {
"bool": {
"should": []
}
},
"filter": {
"bool": {
"must": [
@ -55,4 +59,4 @@
],
"size": 10,
"track_scores": true
}
}

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

File diff suppressed because it is too large Load Diff

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

@ -2,8 +2,12 @@
"query": {
"function_score": {
"query": {
"bool": {
"should": [],
"filtered": {
"query": {
"bool": {
"should": []
}
},
"filter": {
"bool": {
"must": [
@ -58,4 +62,4 @@
],
"size": 10,
"track_scores": true
}
}

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

@ -2,8 +2,12 @@
"query": {
"function_score": {
"query": {
"bool": {
"should": [],
"filtered": {
"query": {
"bool": {
"should": []
}
},
"filter": {
"bool": {
"must": [
@ -61,4 +65,4 @@
],
"size": 10,
"track_scores": true
}
}

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

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

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

@ -2,8 +2,12 @@
"query": {
"function_score": {
"query": {
"bool": {
"should": [],
"filtered": {
"query": {
"bool": {
"should": []
}
},
"filter": {
"bool": {
"must": [
@ -61,4 +65,4 @@
],
"size": 10,
"track_scores": true
}
}

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

@ -2,8 +2,12 @@
"query": {
"function_score": {
"query": {
"bool": {
"should": [],
"filtered": {
"query": {
"bool": {
"should": []
}
},
"filter": {
"bool": {
"must": [
@ -47,4 +51,4 @@
],
"size": 10,
"track_scores": true
}
}

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

@ -2,8 +2,12 @@
"query": {
"function_score": {
"query": {
"bool": {
"should": [],
"filtered": {
"query": {
"bool": {
"should": []
}
},
"filter": {
"bool": {
"must": [
@ -47,4 +51,4 @@
],
"size": 10,
"track_scores": true
}
}

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

@ -2,8 +2,12 @@
"query": {
"function_score": {
"query": {
"bool": {
"should": [],
"filtered": {
"query": {
"bool": {
"should": []
}
},
"filter": {
"bool": {
"must": [
@ -47,4 +51,4 @@
],
"size": 10,
"track_scores": true
}
}

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

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

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

@ -2,9 +2,12 @@
"query": {
"function_score": {
"query": {
"bool": {
"should": [
],
"filtered": {
"query": {
"bool": {
"should": []
}
},
"filter": {
"bool": {
"must": [
@ -48,4 +51,4 @@
],
"size": 20,
"track_scores": true
}
}
Loading…
Cancel
Save