diff --git a/query/view/ngrams_last_token_only.js b/query/view/ngrams_last_token_only.js index db2862c31..78b382cb5 100644 --- a/query/view/ngrams_last_token_only.js +++ b/query/view/ngrams_last_token_only.js @@ -29,7 +29,7 @@ module.exports = function( vs ){ // return the view rendered using the copy return { 'constant_score': { - 'query': ngrams_strict( vsCopy ) + 'filter': ngrams_strict( vsCopy ) } }; }; diff --git a/query/view/ngrams_last_token_only_multi.js b/query/view/ngrams_last_token_only_multi.js index 17fa6aeec..dc75cf8e8 100644 --- a/query/view/ngrams_last_token_only_multi.js +++ b/query/view/ngrams_last_token_only_multi.js @@ -37,7 +37,7 @@ module.exports = function (adminFields){ // return the view rendered using the copy return { 'constant_score': { - 'query': rendered + 'filter': rendered } }; }; diff --git a/test/unit/fixture/autocomplete_boundary_country.js b/test/unit/fixture/autocomplete_boundary_country.js index adfdbb421..ac7c6dae9 100644 --- a/test/unit/fixture/autocomplete_boundary_country.js +++ b/test/unit/fixture/autocomplete_boundary_country.js @@ -3,7 +3,7 @@ module.exports = { 'bool': { 'must': [{ 'constant_score': { - 'query': { + 'filter': { 'match_phrase': { 'name.default': { 'analyzer': 'peliasQuery', diff --git a/test/unit/fixture/autocomplete_boundary_gid.js b/test/unit/fixture/autocomplete_boundary_gid.js index de6ff2291..bf43efd1a 100644 --- a/test/unit/fixture/autocomplete_boundary_gid.js +++ b/test/unit/fixture/autocomplete_boundary_gid.js @@ -3,7 +3,7 @@ module.exports = { 'bool': { 'must': [{ 'constant_score': { - 'query': { + 'filter': { 'match_phrase': { 'name.default': { 'analyzer': 'peliasQuery', diff --git a/test/unit/fixture/autocomplete_linguistic_bbox_san_francisco.js b/test/unit/fixture/autocomplete_linguistic_bbox_san_francisco.js index 4c9cd3a73..3f6635199 100644 --- a/test/unit/fixture/autocomplete_linguistic_bbox_san_francisco.js +++ b/test/unit/fixture/autocomplete_linguistic_bbox_san_francisco.js @@ -3,7 +3,7 @@ module.exports = { 'bool': { 'must': [{ 'constant_score': { - 'query': { + 'filter': { 'match_phrase': { 'name.default': { 'analyzer': 'peliasQuery', diff --git a/test/unit/fixture/autocomplete_linguistic_circle_san_francisco.js b/test/unit/fixture/autocomplete_linguistic_circle_san_francisco.js index e112ca2a7..bf4c4f53c 100644 --- a/test/unit/fixture/autocomplete_linguistic_circle_san_francisco.js +++ b/test/unit/fixture/autocomplete_linguistic_circle_san_francisco.js @@ -4,7 +4,7 @@ module.exports = { 'must': [ { 'constant_score': { - 'query': { + 'filter': { 'match_phrase': { 'name.default': { 'analyzer': 'peliasQuery', diff --git a/test/unit/fixture/autocomplete_linguistic_focus.js b/test/unit/fixture/autocomplete_linguistic_focus.js index 945dc1243..be40ea86c 100644 --- a/test/unit/fixture/autocomplete_linguistic_focus.js +++ b/test/unit/fixture/autocomplete_linguistic_focus.js @@ -3,7 +3,7 @@ module.exports = { 'bool': { 'must': [{ 'constant_score': { - 'query': { + 'filter': { 'match_phrase': { 'name.default': { 'analyzer': 'peliasQuery', diff --git a/test/unit/fixture/autocomplete_linguistic_focus_null_island.js b/test/unit/fixture/autocomplete_linguistic_focus_null_island.js index ab6e69296..bac7df6dd 100644 --- a/test/unit/fixture/autocomplete_linguistic_focus_null_island.js +++ b/test/unit/fixture/autocomplete_linguistic_focus_null_island.js @@ -3,7 +3,7 @@ module.exports = { 'bool': { 'must': [{ 'constant_score': { - 'query': { + 'filter': { 'match_phrase': { 'name.default': { 'analyzer': 'peliasQuery', diff --git a/test/unit/fixture/autocomplete_linguistic_multiple_tokens.js b/test/unit/fixture/autocomplete_linguistic_multiple_tokens.js index e48093d6e..8370bc270 100644 --- a/test/unit/fixture/autocomplete_linguistic_multiple_tokens.js +++ b/test/unit/fixture/autocomplete_linguistic_multiple_tokens.js @@ -13,7 +13,7 @@ module.exports = { }, { 'constant_score': { - 'query': { + 'filter': { 'multi_match': { 'fields': [ 'parent.country.ngram^1', diff --git a/test/unit/fixture/autocomplete_linguistic_multiple_tokens_complete_numeric.js b/test/unit/fixture/autocomplete_linguistic_multiple_tokens_complete_numeric.js index db3c583ee..92471ba24 100644 --- a/test/unit/fixture/autocomplete_linguistic_multiple_tokens_complete_numeric.js +++ b/test/unit/fixture/autocomplete_linguistic_multiple_tokens_complete_numeric.js @@ -13,7 +13,7 @@ module.exports = { }, { 'constant_score': { - 'query': { + 'filter': { 'match_phrase': { 'name.default': { 'analyzer': 'peliasQuery', diff --git a/test/unit/fixture/autocomplete_linguistic_one_char_token.js b/test/unit/fixture/autocomplete_linguistic_one_char_token.js index a96bb4071..c24fdcc36 100644 --- a/test/unit/fixture/autocomplete_linguistic_one_char_token.js +++ b/test/unit/fixture/autocomplete_linguistic_one_char_token.js @@ -3,7 +3,7 @@ module.exports = { 'bool': { 'must': [{ 'constant_score': { - 'query': { + 'filter': { 'match_phrase': { 'name.default': { 'analyzer': 'peliasQuery', diff --git a/test/unit/fixture/autocomplete_linguistic_only.js b/test/unit/fixture/autocomplete_linguistic_only.js index f86aafe16..776e38739 100644 --- a/test/unit/fixture/autocomplete_linguistic_only.js +++ b/test/unit/fixture/autocomplete_linguistic_only.js @@ -3,7 +3,7 @@ module.exports = { 'bool': { 'must': [{ 'constant_score': { - 'query': { + 'filter': { 'match_phrase': { 'name.default': { 'analyzer': 'peliasQuery', diff --git a/test/unit/fixture/autocomplete_linguistic_three_char_token.js b/test/unit/fixture/autocomplete_linguistic_three_char_token.js index a0f73ffc7..f373b0af5 100644 --- a/test/unit/fixture/autocomplete_linguistic_three_char_token.js +++ b/test/unit/fixture/autocomplete_linguistic_three_char_token.js @@ -3,7 +3,7 @@ module.exports = { 'bool': { 'must': [{ 'constant_score': { - 'query': { + 'filter': { 'match_phrase': { 'name.default': { 'analyzer': 'peliasQuery', diff --git a/test/unit/fixture/autocomplete_linguistic_two_char_token.js b/test/unit/fixture/autocomplete_linguistic_two_char_token.js index 27b0630cb..bfabc3ff2 100644 --- a/test/unit/fixture/autocomplete_linguistic_two_char_token.js +++ b/test/unit/fixture/autocomplete_linguistic_two_char_token.js @@ -3,7 +3,7 @@ module.exports = { 'bool': { 'must': [{ 'constant_score': { - 'query': { + 'filter': { 'match_phrase': { 'name.default': { 'analyzer': 'peliasQuery', diff --git a/test/unit/fixture/autocomplete_with_category_filtering.js b/test/unit/fixture/autocomplete_with_category_filtering.js index a9f4f6e71..13ee45eed 100644 --- a/test/unit/fixture/autocomplete_with_category_filtering.js +++ b/test/unit/fixture/autocomplete_with_category_filtering.js @@ -3,7 +3,7 @@ module.exports = { 'bool': { 'must': [{ 'constant_score': { - 'query': { + 'filter': { 'match_phrase': { 'name.default': { 'analyzer': 'peliasQuery', diff --git a/test/unit/fixture/autocomplete_with_layer_filtering.js b/test/unit/fixture/autocomplete_with_layer_filtering.js index 36b4b38a6..758702217 100644 --- a/test/unit/fixture/autocomplete_with_layer_filtering.js +++ b/test/unit/fixture/autocomplete_with_layer_filtering.js @@ -3,7 +3,7 @@ module.exports = { 'bool': { 'must': [{ 'constant_score': { - 'query': { + 'filter': { 'match_phrase': { 'name.default': { 'analyzer': 'peliasQuery', diff --git a/test/unit/fixture/autocomplete_with_source_filtering.js b/test/unit/fixture/autocomplete_with_source_filtering.js index d18f6b45a..1b2565ef2 100644 --- a/test/unit/fixture/autocomplete_with_source_filtering.js +++ b/test/unit/fixture/autocomplete_with_source_filtering.js @@ -3,7 +3,7 @@ module.exports = { 'bool': { 'must': [{ 'constant_score': { - 'query': { + 'filter': { 'match_phrase': { 'name.default': { 'analyzer': 'peliasQuery',