Browse Source

Use bool instead of filtered queries in fixtures

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

6
test/unit/fixture/search_boundary_country.js

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

9
test/unit/fixture/search_fallback.js

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

9
test/unit/fixture/search_fallback_postalcode_only.js

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

6
test/unit/fixture/search_linguistic_bbox.js

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

6
test/unit/fixture/search_linguistic_focus.js

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

6
test/unit/fixture/search_linguistic_focus_bbox.js

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

6
test/unit/fixture/search_linguistic_focus_null_island.js

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

6
test/unit/fixture/search_linguistic_only.js

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

6
test/unit/fixture/search_linguistic_viewport.js

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

6
test/unit/fixture/search_linguistic_viewport_min_diagonal.js

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

6
test/unit/fixture/search_with_category_filtering.js

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

6
test/unit/fixture/search_with_source_filtering.js

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save