diff --git a/package.json b/package.json index 23d4ae4a..95743d7f 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "pelias-logger": "^1.2.0", "pelias-microservice-wrapper": "^1.4.0", "pelias-model": "^5.5.2", - "pelias-query": "^9.1.1", + "pelias-query": "pelias/query#cutoff_frequency", "pelias-sorting": "^1.2.0", "predicates": "^2.0.0", "retry": "^0.12.0", diff --git a/query/autocomplete_defaults.js b/query/autocomplete_defaults.js index dbba5861..38bf5877 100644 --- a/query/autocomplete_defaults.js +++ b/query/autocomplete_defaults.js @@ -20,11 +20,13 @@ module.exports = _.merge({}, peliasQuery.defaults, { 'ngram:analyzer': 'peliasQueryPartialToken', 'ngram:field': 'name.default', 'ngram:boost': 100, + 'ngram:cutoff_frequency': 0.01, 'phrase:analyzer': 'peliasQueryFullToken', 'phrase:field': 'name.default', 'phrase:boost': 1, 'phrase:slop': 3, + 'phrase:cutoff_frequency': 0.01, 'focus:function': 'linear', 'focus:offset': '0km', @@ -47,6 +49,8 @@ module.exports = _.merge({}, peliasQuery.defaults, { 'address:postcode:field': 'address_parts.zip', 'address:postcode:boost': 2000, + 'address:cutoff_frequency': 0.01, + 'admin:country_a:analyzer': 'standard', 'admin:country_a:field': 'parent.country_a', 'admin:country_a:boost': 1000, @@ -83,6 +87,8 @@ module.exports = _.merge({}, peliasQuery.defaults, { 'admin:borough:field': 'parent.borough', 'admin:borough:boost': 600, + 'admin:cutoff_frequency': 0.01, + 'popularity:field': 'popularity', 'popularity:modifier': 'log1p', 'popularity:max_boost': 20, diff --git a/query/search_defaults.js b/query/search_defaults.js index 92154ee8..701fae0a 100644 --- a/query/search_defaults.js +++ b/query/search_defaults.js @@ -20,11 +20,13 @@ module.exports = _.merge({}, peliasQuery.defaults, { 'ngram:analyzer': 'peliasQueryFullToken', 'ngram:field': 'name.default', 'ngram:boost': 1, + 'ngram:cutoff_frequency': 0.01, 'phrase:analyzer': 'peliasPhrase', 'phrase:field': 'phrase.default', 'phrase:boost': 1, 'phrase:slop': 2, + 'phrase:cutoff_frequency': 0.01, 'focus:function': 'linear', 'focus:offset': '0km', @@ -47,6 +49,8 @@ module.exports = _.merge({}, peliasQuery.defaults, { 'address:postcode:field': 'address_parts.zip', 'address:postcode:boost': 20, + 'address:cutoff_frequency': 0.01, + 'admin:country_a:analyzer': 'standard', 'admin:country_a:field': 'parent.country_a', 'admin:country_a:boost': 1, @@ -83,6 +87,8 @@ module.exports = _.merge({}, peliasQuery.defaults, { 'admin:neighbourhood:field': 'parent.neighbourhood', 'admin:neighbourhood:boost': 1, + 'admin:cutoff_frequency': 0.01, + 'popularity:field': 'popularity', 'popularity:modifier': 'log1p', 'popularity:max_boost': 20, diff --git a/test/unit/fixture/autocomplete_boundary_country.js b/test/unit/fixture/autocomplete_boundary_country.js index 928c3efe..d102c852 100644 --- a/test/unit/fixture/autocomplete_boundary_country.js +++ b/test/unit/fixture/autocomplete_boundary_country.js @@ -9,6 +9,7 @@ module.exports = { 'analyzer': 'peliasQueryPartialToken', 'boost': 100, 'query': 'test', + 'cutoff_frequency': 0.01, 'type': 'phrase', 'operator': 'and', 'slop': 3 diff --git a/test/unit/fixture/autocomplete_linguistic_bbox_san_francisco.js b/test/unit/fixture/autocomplete_linguistic_bbox_san_francisco.js index 5e47e603..35e3185a 100644 --- a/test/unit/fixture/autocomplete_linguistic_bbox_san_francisco.js +++ b/test/unit/fixture/autocomplete_linguistic_bbox_san_francisco.js @@ -9,6 +9,7 @@ module.exports = { 'analyzer': 'peliasQueryPartialToken', 'boost': 100, 'query': 'test', + 'cutoff_frequency': 0.01, 'type': 'phrase', 'operator': 'and', 'slop': 3 diff --git a/test/unit/fixture/autocomplete_linguistic_final_token.js b/test/unit/fixture/autocomplete_linguistic_final_token.js index 4f250ec3..875f61f8 100644 --- a/test/unit/fixture/autocomplete_linguistic_final_token.js +++ b/test/unit/fixture/autocomplete_linguistic_final_token.js @@ -5,6 +5,7 @@ module.exports = { 'match': { 'name.default': { 'analyzer': 'peliasQueryFullToken', + 'cutoff_frequency': 0.01, 'boost': 1, 'slop': 3, 'query': 'one', @@ -16,6 +17,7 @@ module.exports = { 'match': { 'phrase.default': { 'analyzer': 'peliasPhrase', + 'cutoff_frequency': 0.01, 'boost': 1, 'slop': 3, 'query': 'one', diff --git a/test/unit/fixture/autocomplete_linguistic_focus.js b/test/unit/fixture/autocomplete_linguistic_focus.js index 2acc0e1d..2577e8ff 100644 --- a/test/unit/fixture/autocomplete_linguistic_focus.js +++ b/test/unit/fixture/autocomplete_linguistic_focus.js @@ -7,6 +7,7 @@ module.exports = { 'match': { 'name.default': { 'analyzer': 'peliasQueryPartialToken', + 'cutoff_frequency': 0.01, 'boost': 100, 'query': 'test', 'type': 'phrase', @@ -23,6 +24,7 @@ module.exports = { 'match': { 'name.default': { 'analyzer': 'peliasQueryPartialToken', + 'cutoff_frequency': 0.01, 'boost': 100, 'query': 'test', 'type': 'phrase', diff --git a/test/unit/fixture/autocomplete_linguistic_focus_null_island.js b/test/unit/fixture/autocomplete_linguistic_focus_null_island.js index d3029455..bbded68b 100644 --- a/test/unit/fixture/autocomplete_linguistic_focus_null_island.js +++ b/test/unit/fixture/autocomplete_linguistic_focus_null_island.js @@ -7,6 +7,7 @@ module.exports = { 'match': { 'name.default': { 'analyzer': 'peliasQueryPartialToken', + 'cutoff_frequency': 0.01, 'boost': 100, 'query': 'test', 'type': 'phrase', @@ -23,6 +24,7 @@ module.exports = { 'match': { 'name.default': { 'analyzer': 'peliasQueryPartialToken', + 'cutoff_frequency': 0.01, 'boost': 100, 'query': 'test', 'type': 'phrase', diff --git a/test/unit/fixture/autocomplete_linguistic_multiple_tokens.js b/test/unit/fixture/autocomplete_linguistic_multiple_tokens.js index b07219ac..4e1b95fe 100644 --- a/test/unit/fixture/autocomplete_linguistic_multiple_tokens.js +++ b/test/unit/fixture/autocomplete_linguistic_multiple_tokens.js @@ -8,6 +8,7 @@ module.exports = { 'type': 'phrase', 'boost': 1, 'slop': 3, + 'cutoff_frequency': 0.01, 'query': 'one two' } } @@ -22,6 +23,7 @@ module.exports = { 'query': 'three', 'type': 'phrase', 'operator': 'and', + 'cutoff_frequency': 0.01, 'slop': 3 } } @@ -36,6 +38,7 @@ module.exports = { 'type' : 'phrase', 'boost' : 1, 'slop' : 3, + 'cutoff_frequency': 0.01, 'query' : 'one two' } } diff --git a/test/unit/fixture/autocomplete_linguistic_only.js b/test/unit/fixture/autocomplete_linguistic_only.js index 036bd180..d422a9ff 100644 --- a/test/unit/fixture/autocomplete_linguistic_only.js +++ b/test/unit/fixture/autocomplete_linguistic_only.js @@ -11,6 +11,7 @@ module.exports = { 'query': 'test', 'type': 'phrase', 'operator': 'and', + 'cutoff_frequency': 0.01, 'slop': 3 } } diff --git a/test/unit/fixture/autocomplete_linguistic_with_admin.js b/test/unit/fixture/autocomplete_linguistic_with_admin.js index 12940e19..c2c8d740 100644 --- a/test/unit/fixture/autocomplete_linguistic_with_admin.js +++ b/test/unit/fixture/autocomplete_linguistic_with_admin.js @@ -9,6 +9,7 @@ module.exports = { 'type': 'phrase', 'boost': 1, 'slop': 3, + 'cutoff_frequency': 0.01, 'query': 'one two' } } @@ -20,6 +21,7 @@ module.exports = { 'parent.country': { 'analyzer': 'peliasAdmin', 'boost': 800, + 'cutoff_frequency': 0.01, 'query': 'three' } } @@ -28,6 +30,7 @@ module.exports = { 'match': { 'parent.region': { 'analyzer': 'peliasAdmin', + 'cutoff_frequency': 0.01, 'boost': 600, 'query': 'three' } @@ -37,6 +40,7 @@ module.exports = { 'match': { 'parent.region_a': { 'analyzer': 'peliasAdmin', + 'cutoff_frequency': 0.01, 'boost': 600, 'query': 'three' } @@ -46,6 +50,7 @@ module.exports = { 'match': { 'parent.county': { 'analyzer': 'peliasAdmin', + 'cutoff_frequency': 0.01, 'boost': 400, 'query': 'three' } @@ -55,6 +60,7 @@ module.exports = { 'match': { 'parent.borough': { 'analyzer': 'peliasAdmin', + 'cutoff_frequency': 0.01, 'boost': 600, 'query': 'three' } @@ -64,6 +70,7 @@ module.exports = { 'match': { 'parent.localadmin': { 'analyzer': 'peliasAdmin', + 'cutoff_frequency': 0.01, 'boost': 200, 'query': 'three' } @@ -73,6 +80,7 @@ module.exports = { 'match': { 'parent.locality': { 'analyzer': 'peliasAdmin', + 'cutoff_frequency': 0.01, 'boost': 200, 'query': 'three' } @@ -82,6 +90,7 @@ module.exports = { 'match': { 'parent.neighbourhood': { 'analyzer': 'peliasAdmin', + 'cutoff_frequency': 0.01, 'boost': 200, 'query': 'three' } @@ -91,6 +100,7 @@ module.exports = { 'match': { 'phrase.default': { 'analyzer' : 'peliasPhrase', + 'cutoff_frequency': 0.01, 'type' : 'phrase', 'boost' : 1, 'slop' : 3, diff --git a/test/unit/fixture/autocomplete_single_character_street.js b/test/unit/fixture/autocomplete_single_character_street.js index fe4e1b5c..d3af4ee0 100644 --- a/test/unit/fixture/autocomplete_single_character_street.js +++ b/test/unit/fixture/autocomplete_single_character_street.js @@ -5,6 +5,7 @@ module.exports = { 'match': { 'name.default': { 'analyzer': 'peliasQueryFullToken', + 'cutoff_frequency': 0.01, 'type': 'phrase', 'boost': 1, 'slop': 3, @@ -17,6 +18,7 @@ module.exports = { 'match': { 'address_parts.street': { 'query': 'k road', + 'cutoff_frequency': 0.01, 'boost': 5, 'analyzer': 'peliasStreet' } @@ -25,6 +27,7 @@ module.exports = { 'match': { 'parent.country': { 'query': 'laird', + 'cutoff_frequency': 0.01, 'boost': 800, 'analyzer': 'peliasAdmin' } @@ -33,6 +36,7 @@ module.exports = { 'match': { 'parent.region': { 'query': 'laird', + 'cutoff_frequency': 0.01, 'boost': 600, 'analyzer': 'peliasAdmin' } @@ -41,6 +45,7 @@ module.exports = { 'match': { 'parent.region_a': { 'query': 'laird', + 'cutoff_frequency': 0.01, 'boost': 600, 'analyzer': 'peliasAdmin' } @@ -49,6 +54,7 @@ module.exports = { 'match': { 'parent.county': { 'query': 'laird', + 'cutoff_frequency': 0.01, 'boost': 400, 'analyzer': 'peliasAdmin' } @@ -57,6 +63,7 @@ module.exports = { 'match': { 'parent.borough': { 'analyzer': 'peliasAdmin', + 'cutoff_frequency': 0.01, 'boost': 600, 'query': 'laird' } @@ -65,6 +72,7 @@ module.exports = { 'match': { 'parent.localadmin': { 'query': 'laird', + 'cutoff_frequency': 0.01, 'boost': 200, 'analyzer': 'peliasAdmin' } @@ -73,6 +81,7 @@ module.exports = { 'match': { 'parent.locality': { 'query': 'laird', + 'cutoff_frequency': 0.01, 'boost': 200, 'analyzer': 'peliasAdmin' } @@ -81,6 +90,7 @@ module.exports = { 'match': { 'parent.neighbourhood': { 'query': 'laird', + 'cutoff_frequency': 0.01, 'boost': 200, 'analyzer': 'peliasAdmin' } @@ -93,6 +103,7 @@ module.exports = { 'type' : 'phrase', 'boost' : 1, 'slop' : 3, + 'cutoff_frequency': 0.01, 'query' : 'k road' } } diff --git a/test/unit/fixture/autocomplete_with_layer_filtering.js b/test/unit/fixture/autocomplete_with_layer_filtering.js index ac5971c4..197a4e01 100644 --- a/test/unit/fixture/autocomplete_with_layer_filtering.js +++ b/test/unit/fixture/autocomplete_with_layer_filtering.js @@ -7,6 +7,7 @@ module.exports = { 'match': { 'name.default': { 'analyzer': 'peliasQueryPartialToken', + 'cutoff_frequency': 0.01, 'boost': 100, 'query': 'test', 'type': 'phrase', diff --git a/test/unit/fixture/autocomplete_with_source_filtering.js b/test/unit/fixture/autocomplete_with_source_filtering.js index ada4c953..e9f56f67 100644 --- a/test/unit/fixture/autocomplete_with_source_filtering.js +++ b/test/unit/fixture/autocomplete_with_source_filtering.js @@ -7,6 +7,7 @@ module.exports = { 'match': { 'name.default': { 'analyzer': 'peliasQueryPartialToken', + 'cutoff_frequency': 0.01, 'boost': 100, 'query': 'test', 'type': 'phrase', diff --git a/test/unit/fixture/search_boundary_country_original.js b/test/unit/fixture/search_boundary_country_original.js index 0ea31ab3..5407c305 100644 --- a/test/unit/fixture/search_boundary_country_original.js +++ b/test/unit/fixture/search_boundary_country_original.js @@ -14,6 +14,7 @@ module.exports = { 'match': { 'name.default': { 'query': 'test', + 'cutoff_frequency': 0.01, 'boost': 1, 'analyzer': 'peliasQueryFullToken' } @@ -24,6 +25,7 @@ module.exports = { 'match': { 'phrase.default': { 'query': 'test', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasPhrase', 'type': 'phrase', 'boost': 1, @@ -36,6 +38,7 @@ module.exports = { 'match': { 'phrase.default': { 'query': 'test', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasPhrase', 'type': 'phrase', 'slop': 2, @@ -61,6 +64,7 @@ module.exports = { 'match': { 'phrase.default': { 'query': 'test', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasPhrase', 'type': 'phrase', 'slop': 2, diff --git a/test/unit/fixture/search_full_address_original.js b/test/unit/fixture/search_full_address_original.js index d6a1478e..9e75e814 100644 --- a/test/unit/fixture/search_full_address_original.js +++ b/test/unit/fixture/search_full_address_original.js @@ -7,6 +7,7 @@ module.exports = { 'match': { 'name.default': { 'query': '123 main st', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasQueryFullToken', 'boost': 1 } @@ -16,6 +17,7 @@ module.exports = { 'match': { 'phrase.default': { 'query': '123 main st', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasPhrase', 'type': 'phrase', 'slop': 2, @@ -29,6 +31,7 @@ module.exports = { 'match': { 'phrase.default': { 'query': '123 main st', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasPhrase', 'type': 'phrase', 'slop': 2, @@ -54,6 +57,7 @@ module.exports = { 'match': { 'phrase.default': { 'query': '123 main st', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasPhrase', 'type': 'phrase', 'slop': 2, @@ -77,6 +81,7 @@ module.exports = { 'match': { 'address_parts.number': { 'query': '123', + 'cutoff_frequency': 0.01, 'boost': vs['address:housenumber:boost'], 'analyzer': vs['address:housenumber:analyzer'] } @@ -85,6 +90,7 @@ module.exports = { 'match': { 'address_parts.street': { 'query': 'main st', + 'cutoff_frequency': 0.01, 'boost': vs['address:street:boost'], 'analyzer': vs['address:street:analyzer'] } @@ -93,6 +99,7 @@ module.exports = { 'match': { 'address_parts.zip': { 'query': '10010', + 'cutoff_frequency': 0.01, 'boost': vs['address:postcode:boost'], 'analyzer': vs['address:postcode:analyzer'] } @@ -101,6 +108,7 @@ module.exports = { 'match': { 'parent.country_a': { 'query': 'USA', + 'cutoff_frequency': 0.01, 'boost': vs['admin:country_a:boost'], 'analyzer': vs['admin:country_a:analyzer'] } @@ -109,6 +117,7 @@ module.exports = { 'match': { 'parent.region_a': { 'query': 'NY', + 'cutoff_frequency': 0.01, 'boost': vs['admin:region_a:boost'], 'analyzer': vs['admin:region_a:analyzer'] } diff --git a/test/unit/fixture/search_linguistic_bbox_original.js b/test/unit/fixture/search_linguistic_bbox_original.js index 56fd90bf..7a5e5627 100644 --- a/test/unit/fixture/search_linguistic_bbox_original.js +++ b/test/unit/fixture/search_linguistic_bbox_original.js @@ -5,6 +5,7 @@ module.exports = { 'match': { 'name.default': { 'query': 'test', + 'cutoff_frequency': 0.01, 'boost': 1, 'analyzer': 'peliasQueryFullToken' } @@ -14,6 +15,7 @@ module.exports = { 'match': { 'phrase.default': { 'query': 'test', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasPhrase', 'type': 'phrase', 'boost': 1, @@ -26,6 +28,7 @@ module.exports = { 'match': { 'phrase.default': { 'query': 'test', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasPhrase', 'type': 'phrase', 'slop': 2, @@ -51,6 +54,7 @@ module.exports = { 'match': { 'phrase.default': { 'query': 'test', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasPhrase', 'type': 'phrase', 'slop': 2, diff --git a/test/unit/fixture/search_linguistic_focus_bbox_original.js b/test/unit/fixture/search_linguistic_focus_bbox_original.js index 43bea77d..38984374 100644 --- a/test/unit/fixture/search_linguistic_focus_bbox_original.js +++ b/test/unit/fixture/search_linguistic_focus_bbox_original.js @@ -5,6 +5,7 @@ module.exports = { 'match': { 'name.default': { 'query': 'test', + 'cutoff_frequency': 0.01, 'boost': 1, 'analyzer': 'peliasQueryFullToken' } @@ -14,6 +15,7 @@ module.exports = { 'match': { 'phrase.default': { 'query': 'test', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasPhrase', 'type': 'phrase', 'boost': 1, @@ -29,6 +31,7 @@ module.exports = { 'type': 'phrase', 'boost': 1, 'slop': 2, + 'cutoff_frequency': 0.01, 'query': 'test' } } @@ -56,6 +59,7 @@ module.exports = { 'match': { 'phrase.default': { 'query': 'test', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasPhrase', 'type': 'phrase', 'slop': 2, @@ -81,6 +85,7 @@ module.exports = { 'match': { 'phrase.default': { 'query': 'test', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasPhrase', 'type': 'phrase', 'slop': 2, diff --git a/test/unit/fixture/search_linguistic_focus_null_island_original.js b/test/unit/fixture/search_linguistic_focus_null_island_original.js index 06b598cc..18852e3d 100644 --- a/test/unit/fixture/search_linguistic_focus_null_island_original.js +++ b/test/unit/fixture/search_linguistic_focus_null_island_original.js @@ -5,6 +5,7 @@ module.exports = { 'match': { 'name.default': { 'query': 'test', + 'cutoff_frequency': 0.01, 'boost': 1, 'analyzer': 'peliasQueryFullToken' } @@ -14,6 +15,7 @@ module.exports = { 'match': { 'phrase.default': { 'query': 'test', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasPhrase', 'type': 'phrase', 'boost': 1, @@ -29,6 +31,7 @@ module.exports = { 'type': 'phrase', 'boost': 1, 'slop': 2, + 'cutoff_frequency': 0.01, 'query': 'test' } } @@ -56,6 +59,7 @@ module.exports = { 'match': { 'phrase.default': { 'query': 'test', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasPhrase', 'type': 'phrase', 'slop': 2, @@ -81,6 +85,7 @@ module.exports = { 'match': { 'phrase.default': { 'query': 'test', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasPhrase', 'type': 'phrase', 'slop': 2, diff --git a/test/unit/fixture/search_linguistic_focus_original.js b/test/unit/fixture/search_linguistic_focus_original.js index 9ece3b86..a528e553 100644 --- a/test/unit/fixture/search_linguistic_focus_original.js +++ b/test/unit/fixture/search_linguistic_focus_original.js @@ -5,6 +5,7 @@ module.exports = { 'match': { 'name.default': { 'query': 'test', + 'cutoff_frequency': 0.01, 'boost': 1, 'analyzer': 'peliasQueryFullToken' } @@ -14,6 +15,7 @@ module.exports = { 'match': { 'phrase.default': { 'query': 'test', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasPhrase', 'type': 'phrase', 'boost': 1, @@ -29,6 +31,7 @@ module.exports = { 'type': 'phrase', 'boost': 1, 'slop': 2, + 'cutoff_frequency': 0.01, 'query': 'test' } } @@ -56,6 +59,7 @@ module.exports = { 'match': { 'phrase.default': { 'query': 'test', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasPhrase', 'type': 'phrase', 'slop': 2, @@ -81,6 +85,7 @@ module.exports = { 'match': { 'phrase.default': { 'query': 'test', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasPhrase', 'type': 'phrase', 'slop': 2, diff --git a/test/unit/fixture/search_linguistic_only_original.js b/test/unit/fixture/search_linguistic_only_original.js index 1029c7f9..4baa9e6d 100644 --- a/test/unit/fixture/search_linguistic_only_original.js +++ b/test/unit/fixture/search_linguistic_only_original.js @@ -5,6 +5,7 @@ module.exports = { 'match': { 'name.default': { 'query': 'test', + 'cutoff_frequency': 0.01, 'boost': 1, 'analyzer': 'peliasQueryFullToken' } @@ -14,6 +15,7 @@ module.exports = { 'match': { 'phrase.default': { 'query': 'test', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasPhrase', 'type': 'phrase', 'boost': 1, @@ -26,6 +28,7 @@ module.exports = { 'match': { 'phrase.default': { 'query': 'test', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasPhrase', 'type': 'phrase', 'slop': 2, @@ -51,6 +54,7 @@ module.exports = { 'match': { 'phrase.default': { 'query': 'test', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasPhrase', 'type': 'phrase', 'slop': 2, diff --git a/test/unit/fixture/search_partial_address_original.js b/test/unit/fixture/search_partial_address_original.js index b0cced91..b1e55bfd 100644 --- a/test/unit/fixture/search_partial_address_original.js +++ b/test/unit/fixture/search_partial_address_original.js @@ -7,6 +7,7 @@ module.exports = { 'match': { 'name.default': { 'query': 'soho grand', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasQueryFullToken', 'boost': 1 } @@ -16,6 +17,7 @@ module.exports = { 'match': { 'phrase.default': { 'query': 'soho grand', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasPhrase', 'type': 'phrase', 'slop': 2, @@ -28,6 +30,7 @@ module.exports = { 'match': { 'phrase.default': { 'query': 'soho grand', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasPhrase', 'type': 'phrase', 'slop': 2, @@ -53,6 +56,7 @@ module.exports = { 'match': { 'phrase.default': { 'query': 'soho grand', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasPhrase', 'type': 'phrase', 'slop': 2, @@ -77,6 +81,7 @@ module.exports = { 'parent.region_a': { 'analyzer': 'peliasAdmin', 'boost': 1, + 'cutoff_frequency': 0.01, 'query': 'NY' } } diff --git a/test/unit/fixture/search_regions_address_original.js b/test/unit/fixture/search_regions_address_original.js index 1d211b8d..e4787872 100644 --- a/test/unit/fixture/search_regions_address_original.js +++ b/test/unit/fixture/search_regions_address_original.js @@ -7,6 +7,7 @@ module.exports = { 'match': { 'name.default': { 'query': '1 water st', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasQueryFullToken', 'boost': 1 } @@ -16,6 +17,7 @@ module.exports = { 'match': { 'phrase.default': { 'query': '1 water st', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasPhrase', 'type': 'phrase', 'slop': 2, @@ -28,6 +30,7 @@ module.exports = { 'match': { 'phrase.default': { 'query': '1 water st', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasPhrase', 'type': 'phrase', 'slop': 2, @@ -53,6 +56,7 @@ module.exports = { 'match': { 'phrase.default': { 'query': '1 water st', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasPhrase', 'type': 'phrase', 'slop': 2, @@ -76,6 +80,7 @@ module.exports = { 'match': { 'address_parts.number': { 'query': '1', + 'cutoff_frequency': 0.01, 'boost': vs['address:housenumber:boost'], 'analyzer': vs['address:housenumber:analyzer'] } @@ -84,6 +89,7 @@ module.exports = { 'match': { 'address_parts.street': { 'query': 'water st', + 'cutoff_frequency': 0.01, 'boost': vs['address:street:boost'], 'analyzer': vs['address:street:analyzer'] } @@ -92,6 +98,7 @@ module.exports = { 'match': { 'parent.region_a': { 'query': 'NY', + 'cutoff_frequency': 0.01, 'boost': vs['admin:region_a:boost'], 'analyzer': vs['admin:region_a:analyzer'] } diff --git a/test/unit/fixture/search_with_category_filtering_original.js b/test/unit/fixture/search_with_category_filtering_original.js index ca1f26bb..014712d4 100644 --- a/test/unit/fixture/search_with_category_filtering_original.js +++ b/test/unit/fixture/search_with_category_filtering_original.js @@ -5,6 +5,7 @@ module.exports = { 'match': { 'name.default': { 'query': 'test', + 'cutoff_frequency': 0.01, 'boost': 1, 'analyzer': 'peliasQueryFullToken' } @@ -14,6 +15,7 @@ module.exports = { 'match': { 'phrase.default': { 'query': 'test', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasPhrase', 'type': 'phrase', 'boost': 1, @@ -26,6 +28,7 @@ module.exports = { 'match': { 'phrase.default': { 'query': 'test', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasPhrase', 'type': 'phrase', 'slop': 2, @@ -51,6 +54,7 @@ module.exports = { 'match': { 'phrase.default': { 'query': 'test', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasPhrase', 'type': 'phrase', 'slop': 2, diff --git a/test/unit/fixture/search_with_source_filtering_original.js b/test/unit/fixture/search_with_source_filtering_original.js index 650fad61..413fec92 100644 --- a/test/unit/fixture/search_with_source_filtering_original.js +++ b/test/unit/fixture/search_with_source_filtering_original.js @@ -5,6 +5,7 @@ module.exports = { 'match': { 'name.default': { 'query': 'test', + 'cutoff_frequency': 0.01, 'boost': 1, 'analyzer': 'peliasQueryFullToken' } @@ -14,6 +15,7 @@ module.exports = { 'match': { 'phrase.default': { 'query': 'test', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasPhrase', 'type': 'phrase', 'boost': 1, @@ -26,6 +28,7 @@ module.exports = { 'match': { 'phrase.default': { 'query': 'test', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasPhrase', 'type': 'phrase', 'slop': 2, @@ -51,6 +54,7 @@ module.exports = { 'match': { 'phrase.default': { 'query': 'test', + 'cutoff_frequency': 0.01, 'analyzer': 'peliasPhrase', 'type': 'phrase', 'slop': 2,