Browse Source

Update fixtures for Elasticsearch 5 queries

These queries use [bool](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-filtered-query.html)
queries instead of the deprecated `filtered` queries, and also set
`minimum_should_match` to 1, which was apparently implied previously.

Connects https://github.com/pelias/api/issues/762
Connects https://github.com/pelias/api/pull/844
Connects https://github.com/pelias/api/pull/855
Connects https://github.com/pelias/pelias/issues/461
pull/923/head
Julian Simioni 8 years ago
parent
commit
35c7c86492
No known key found for this signature in database
GPG Key ID: B9EEB0C6EE0910A1
  1. 7
      test/unit/fixture/search_boundary_country.js
  2. 10
      test/unit/fixture/search_fallback.js
  3. 10
      test/unit/fixture/search_fallback_postalcode_only.js
  4. 7
      test/unit/fixture/search_linguistic_bbox.js
  5. 7
      test/unit/fixture/search_linguistic_focus.js
  6. 7
      test/unit/fixture/search_linguistic_focus_bbox.js
  7. 7
      test/unit/fixture/search_linguistic_focus_null_island.js
  8. 7
      test/unit/fixture/search_linguistic_only.js
  9. 7
      test/unit/fixture/search_linguistic_viewport.js
  10. 7
      test/unit/fixture/search_linguistic_viewport_min_diagonal.js
  11. 7
      test/unit/fixture/search_with_category_filtering.js
  12. 7
      test/unit/fixture/search_with_source_filtering.js
  13. 7
      test/unit/fixture/structured_geocoding/boundary_country.json
  14. 10
      test/unit/fixture/structured_geocoding/fallback.json
  15. 7
      test/unit/fixture/structured_geocoding/linguistic_bbox.json
  16. 7
      test/unit/fixture/structured_geocoding/linguistic_focus.json
  17. 7
      test/unit/fixture/structured_geocoding/linguistic_focus_bbox.json
  18. 7
      test/unit/fixture/structured_geocoding/linguistic_focus_null_island.json
  19. 7
      test/unit/fixture/structured_geocoding/linguistic_only.json
  20. 7
      test/unit/fixture/structured_geocoding/linguistic_viewport.json
  21. 7
      test/unit/fixture/structured_geocoding/linguistic_viewport_min_diagonal.json
  22. 10
      test/unit/fixture/structured_geocoding/postalcode_only.js
  23. 8
      test/unit/fixture/structured_geocoding/with_source_filtering.json

7
test/unit/fixture/search_boundary_country.js

@ -1,10 +1,9 @@
module.exports = {
'query': {
'function_score': {
'query': {
'filtered': {
'query': {
'bool': {
'minimum_should_match': 1,
'should': [
{
'bool': {
@ -25,9 +24,7 @@ module.exports = {
}
}
}
]
}
},
],
'filter': {
'bool': {
'must': [

10
test/unit/fixture/search_fallback.js

@ -1,10 +1,9 @@
module.exports = {
'query': {
'function_score': {
'query': {
'filtered': {
'query': {
'bool': {
'minimum_should_match': 1,
'should': [
{
'bool': {
@ -828,13 +827,6 @@ module.exports = {
]
}
},
'filter': {
'bool': {
'must': []
}
}
}
},
'max_boost': 20,
'functions': [
{

10
test/unit/fixture/search_fallback_postalcode_only.js

@ -1,10 +1,9 @@
module.exports = {
'query': {
'function_score': {
'query': {
'filtered': {
'query': {
'bool': {
'minimum_should_match': 1,
'should': [
{
'bool': {
@ -30,13 +29,6 @@ module.exports = {
]
}
},
'filter': {
'bool': {
'must': []
}
}
}
},
'max_boost': 20,
'functions': [
{

7
test/unit/fixture/search_linguistic_bbox.js

@ -1,10 +1,9 @@
module.exports = {
'query': {
'function_score': {
'query': {
'filtered': {
'query': {
'bool': {
'minimum_should_match': 1,
'should': [
{
'bool': {
@ -25,9 +24,7 @@ module.exports = {
}
}
}
]
}
},
],
'filter': {
'bool': {
'must': [

7
test/unit/fixture/search_linguistic_focus.js

@ -1,10 +1,9 @@
module.exports = {
'query': {
'function_score': {
'query': {
'filtered': {
'query': {
'bool': {
'minimum_should_match': 1,
'should': [
{
'bool': {
@ -25,9 +24,7 @@ module.exports = {
}
}
}
]
}
},
],
'filter': {
'bool': {
'must': [

7
test/unit/fixture/search_linguistic_focus_bbox.js

@ -1,10 +1,9 @@
module.exports = {
'query': {
'function_score': {
'query': {
'filtered': {
'query': {
'bool': {
'minimum_should_match': 1,
'should': [
{
'bool': {
@ -25,9 +24,7 @@ module.exports = {
}
}
}
]
}
},
],
'filter': {
'bool': {
'must': [

7
test/unit/fixture/search_linguistic_focus_null_island.js

@ -1,10 +1,9 @@
module.exports = {
'query': {
'function_score': {
'query': {
'filtered': {
'query': {
'bool': {
'minimum_should_match': 1,
'should': [
{
'bool': {
@ -25,9 +24,7 @@ module.exports = {
}
}
}
]
}
},
],
'filter': {
'bool': {
'must': [

7
test/unit/fixture/search_linguistic_only.js

@ -1,10 +1,9 @@
module.exports = {
'query': {
'function_score': {
'query': {
'filtered': {
'query': {
'bool': {
'minimum_should_match': 1,
'should': [
{
'bool': {
@ -25,9 +24,7 @@ module.exports = {
}
}
}
]
}
},
],
'filter': {
'bool': {
'must': [

7
test/unit/fixture/search_linguistic_viewport.js

@ -1,10 +1,9 @@
module.exports = {
'query': {
'function_score': {
'query': {
'filtered': {
'query': {
'bool': {
'minimum_should_match': 1,
'should': [
{
'bool': {
@ -25,9 +24,7 @@ module.exports = {
}
}
}
]
}
},
],
'filter': {
'bool': {
'must': [

7
test/unit/fixture/search_linguistic_viewport_min_diagonal.js

@ -1,10 +1,9 @@
module.exports = {
'query': {
'function_score': {
'query': {
'filtered': {
'query': {
'bool': {
'minimum_should_match': 1,
'should': [
{
'bool': {
@ -25,9 +24,7 @@ module.exports = {
}
}
}
]
}
},
],
'filter': {
'bool': {
'must': [

7
test/unit/fixture/search_with_category_filtering.js

@ -1,10 +1,9 @@
module.exports = {
'query': {
'function_score': {
'query': {
'filtered': {
'query': {
'bool': {
'minimum_should_match': 1,
'should': [
{
'bool': {
@ -25,9 +24,7 @@ module.exports = {
}
}
}
]
}
},
],
'filter': {
'bool': {
'must': [

7
test/unit/fixture/search_with_source_filtering.js

@ -1,10 +1,9 @@
module.exports = {
'query': {
'function_score': {
'query': {
'filtered': {
'query': {
'bool': {
'minimum_should_match': 1,
'should': [
{
'bool': {
@ -25,9 +24,7 @@ module.exports = {
}
}
}
]
}
},
],
'filter': {
'bool': {
'must': [

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

@ -1,13 +1,10 @@
{
"query": {
"function_score": {
"query": {
"filtered": {
"query": {
"bool": {
"should": []
}
},
"minimum_should_match": 1,
"should": [],
"filter": {
"bool": {
"must": [

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

@ -1,10 +1,9 @@
{
"query": {
"function_score": {
"query": {
"filtered": {
"query": {
"bool": {
"minimum_should_match": 1,
"should": [
{
"bool": {
@ -829,13 +828,6 @@
]
}
},
"filter": {
"bool": {
"must": []
}
}
}
},
"max_boost": 20,
"functions": [
{

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

@ -1,13 +1,10 @@
{
"query": {
"function_score": {
"query": {
"filtered": {
"query": {
"bool": {
"should": []
}
},
"minimum_should_match": 1,
"should": [],
"filter": {
"bool": {
"must": [

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

@ -1,13 +1,10 @@
{
"query": {
"function_score": {
"query": {
"filtered": {
"query": {
"bool": {
"should": []
}
},
"minimum_should_match": 1,
"should": [],
"filter": {
"bool": {
"must": [

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

@ -1,13 +1,10 @@
{
"query": {
"function_score": {
"query": {
"filtered": {
"query": {
"bool": {
"should": []
}
},
"minimum_should_match": 1,
"should": [],
"filter": {
"bool": {
"must": [

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

@ -1,13 +1,10 @@
{
"query": {
"function_score": {
"query": {
"filtered": {
"query": {
"bool": {
"should": []
}
},
"minimum_should_match": 1,
"should": [],
"filter": {
"bool": {
"must": [

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

@ -1,13 +1,10 @@
{
"query": {
"function_score": {
"query": {
"filtered": {
"query": {
"bool": {
"should": []
}
},
"minimum_should_match": 1,
"should": [],
"filter": {
"bool": {
"must": [

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

@ -1,13 +1,10 @@
{
"query": {
"function_score": {
"query": {
"filtered": {
"query": {
"bool": {
"should": []
}
},
"minimum_should_match": 1,
"should": [],
"filter": {
"bool": {
"must": [

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

@ -1,13 +1,10 @@
{
"query": {
"function_score": {
"query": {
"filtered": {
"query": {
"bool": {
"should": []
}
},
"minimum_should_match": 1,
"should": [],
"filter": {
"bool": {
"must": [

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

@ -1,10 +1,9 @@
module.exports = {
'query': {
'function_score': {
'query': {
'filtered': {
'query': {
'bool': {
'minimum_should_match': 1,
'should': [
{
'bool': {
@ -30,13 +29,6 @@ module.exports = {
]
}
},
'filter': {
'bool': {
'must': []
}
}
}
},
'max_boost': 20,
'functions': [
{

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

@ -1,13 +1,11 @@
{
"query": {
"function_score": {
"query": {
"filtered": {
"query": {
"bool": {
"should": []
}
},
"minimum_should_match": 1,
"should": [
],
"filter": {
"bool": {
"must": [

Loading…
Cancel
Save