From 5f85b2a0e77e1dad7060f5e1cc8000bd43d5edc9 Mon Sep 17 00:00:00 2001 From: missinglink Date: Mon, 28 Feb 2022 19:18:46 +0100 Subject: [PATCH] feat(scoring): deterministic score tiebreaker --- package.json | 2 +- test/unit/fixture/autocomplete_boundary_country.js | 2 +- test/unit/fixture/autocomplete_boundary_gid.js | 2 +- test/unit/fixture/autocomplete_custom_boosts.json | 3 ++- .../fixture/autocomplete_linguistic_bbox_san_francisco.js | 2 +- .../fixture/autocomplete_linguistic_circle_san_francisco.js | 4 +--- test/unit/fixture/autocomplete_linguistic_final_token.js | 2 +- test/unit/fixture/autocomplete_linguistic_focus.js | 2 +- .../unit/fixture/autocomplete_linguistic_focus_null_island.js | 2 +- test/unit/fixture/autocomplete_linguistic_multiple_tokens.js | 2 +- ...utocomplete_linguistic_multiple_tokens_complete_numeric.js | 2 +- test/unit/fixture/autocomplete_linguistic_one_char_token.js | 2 +- test/unit/fixture/autocomplete_linguistic_only.js | 2 +- test/unit/fixture/autocomplete_linguistic_three_char_token.js | 2 +- test/unit/fixture/autocomplete_linguistic_two_char_token.js | 2 +- test/unit/fixture/autocomplete_linguistic_with_admin.js | 4 +--- test/unit/fixture/autocomplete_single_character_street.js | 2 +- test/unit/fixture/autocomplete_with_category_filtering.js | 2 +- test/unit/fixture/autocomplete_with_layer_filtering.js | 2 +- test/unit/fixture/autocomplete_with_source_filtering.js | 2 +- test/unit/fixture/search_boundary_country.js | 4 +--- test/unit/fixture/search_boundary_country_multi.js | 4 +--- test/unit/fixture/search_boundary_gid.js | 4 +--- test/unit/fixture/search_fallback.js | 4 +--- test/unit/fixture/search_fallback_postalcode_only.js | 4 +--- test/unit/fixture/search_linguistic_bbox.js | 4 +--- test/unit/fixture/search_linguistic_focus.js | 4 +--- test/unit/fixture/search_linguistic_focus_bbox.js | 4 +--- test/unit/fixture/search_linguistic_focus_null_island.js | 4 +--- test/unit/fixture/search_linguistic_only.js | 4 +--- test/unit/fixture/search_pelias_parser_boundary_country.js | 2 +- test/unit/fixture/search_pelias_parser_boundary_gid.js | 2 +- test/unit/fixture/search_pelias_parser_full_address.js | 2 +- test/unit/fixture/search_pelias_parser_linguistic_bbox.js | 2 +- test/unit/fixture/search_pelias_parser_linguistic_focus.js | 2 +- .../fixture/search_pelias_parser_linguistic_focus_bbox.js | 2 +- .../search_pelias_parser_linguistic_focus_null_island.js | 2 +- test/unit/fixture/search_pelias_parser_linguistic_only.js | 2 +- test/unit/fixture/search_pelias_parser_partial_address.js | 2 +- test/unit/fixture/search_pelias_parser_regions_address.js | 2 +- .../fixture/search_pelias_parser_with_category_filtering.js | 4 +--- .../fixture/search_pelias_parser_with_source_filtering.js | 2 +- test/unit/fixture/search_with_category_filtering.js | 4 +--- test/unit/fixture/search_with_custom_boosts.json | 2 +- test/unit/fixture/search_with_source_filtering.js | 4 +--- 45 files changed, 46 insertions(+), 75 deletions(-) diff --git a/package.json b/package.json index 596b931c4..6fa224099 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "pelias-microservice-wrapper": "^1.10.0", "pelias-model": "^9.0.0", "pelias-parser": "2.2.0", - "pelias-query": "^11.0.0", + "pelias-query": "github:pelias/query#deterministic-scoring", "pelias-sorting": "^1.2.0", "predicates": "^2.0.0", "regenerate": "^1.4.0", diff --git a/test/unit/fixture/autocomplete_boundary_country.js b/test/unit/fixture/autocomplete_boundary_country.js index 64a70552c..7d9984f5f 100644 --- a/test/unit/fixture/autocomplete_boundary_country.js +++ b/test/unit/fixture/autocomplete_boundary_country.js @@ -60,7 +60,7 @@ module.exports = { }] } }, - 'sort': [ '_score' ], + 'sort': ['_score', '_id'], 'size': 20, 'track_scores': true }; diff --git a/test/unit/fixture/autocomplete_boundary_gid.js b/test/unit/fixture/autocomplete_boundary_gid.js index 5ccb058ca..117315bd8 100644 --- a/test/unit/fixture/autocomplete_boundary_gid.js +++ b/test/unit/fixture/autocomplete_boundary_gid.js @@ -58,7 +58,7 @@ module.exports = { }] } }, - 'sort': [ '_score' ], + 'sort': ['_score', '_id'], 'size': 20, 'track_scores': true }; diff --git a/test/unit/fixture/autocomplete_custom_boosts.json b/test/unit/fixture/autocomplete_custom_boosts.json index 556f1452b..b4709a5d6 100644 --- a/test/unit/fixture/autocomplete_custom_boosts.json +++ b/test/unit/fixture/autocomplete_custom_boosts.json @@ -88,7 +88,8 @@ "size": 10, "track_scores": true, "sort": [ - "_score" + "_score", + "_id" ] } } diff --git a/test/unit/fixture/autocomplete_linguistic_bbox_san_francisco.js b/test/unit/fixture/autocomplete_linguistic_bbox_san_francisco.js index 787450f4a..77291bfc6 100644 --- a/test/unit/fixture/autocomplete_linguistic_bbox_san_francisco.js +++ b/test/unit/fixture/autocomplete_linguistic_bbox_san_francisco.js @@ -63,7 +63,7 @@ module.exports = { }] } }, - 'sort': [ '_score' ], + 'sort': ['_score', '_id'], 'size': 20, 'track_scores': true }; diff --git a/test/unit/fixture/autocomplete_linguistic_circle_san_francisco.js b/test/unit/fixture/autocomplete_linguistic_circle_san_francisco.js index fdeb8757f..6c595ba57 100644 --- a/test/unit/fixture/autocomplete_linguistic_circle_san_francisco.js +++ b/test/unit/fixture/autocomplete_linguistic_circle_san_francisco.js @@ -79,7 +79,5 @@ module.exports = { }, 'size': 20, 'track_scores': true, - 'sort': [ - '_score' - ] + 'sort': ['_score', '_id'], }; diff --git a/test/unit/fixture/autocomplete_linguistic_final_token.js b/test/unit/fixture/autocomplete_linguistic_final_token.js index 43ffa2783..84842c602 100644 --- a/test/unit/fixture/autocomplete_linguistic_final_token.js +++ b/test/unit/fixture/autocomplete_linguistic_final_token.js @@ -48,7 +48,7 @@ module.exports = { }] } }, - 'sort': [ '_score' ], + 'sort': ['_score', '_id'], 'size': 20, 'track_scores': true }; diff --git a/test/unit/fixture/autocomplete_linguistic_focus.js b/test/unit/fixture/autocomplete_linguistic_focus.js index bfde87014..147e9766a 100644 --- a/test/unit/fixture/autocomplete_linguistic_focus.js +++ b/test/unit/fixture/autocomplete_linguistic_focus.js @@ -116,7 +116,7 @@ module.exports = { }] } }, - 'sort': [ '_score' ], + 'sort': ['_score', '_id'], 'size': 20, 'track_scores': true }; diff --git a/test/unit/fixture/autocomplete_linguistic_focus_null_island.js b/test/unit/fixture/autocomplete_linguistic_focus_null_island.js index 5ceed3548..b731bf256 100644 --- a/test/unit/fixture/autocomplete_linguistic_focus_null_island.js +++ b/test/unit/fixture/autocomplete_linguistic_focus_null_island.js @@ -114,7 +114,7 @@ module.exports = { }] } }, - 'sort': [ '_score' ], + 'sort': ['_score', '_id'], 'size': 20, 'track_scores': true }; diff --git a/test/unit/fixture/autocomplete_linguistic_multiple_tokens.js b/test/unit/fixture/autocomplete_linguistic_multiple_tokens.js index 157c224d1..b88f2bc8d 100644 --- a/test/unit/fixture/autocomplete_linguistic_multiple_tokens.js +++ b/test/unit/fixture/autocomplete_linguistic_multiple_tokens.js @@ -76,7 +76,7 @@ module.exports = { }] } }, - 'sort': [ '_score' ], + 'sort': ['_score', '_id'], 'size': 20, 'track_scores': true }; 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 3bb89a8fa..953ae753b 100644 --- a/test/unit/fixture/autocomplete_linguistic_multiple_tokens_complete_numeric.js +++ b/test/unit/fixture/autocomplete_linguistic_multiple_tokens_complete_numeric.js @@ -63,7 +63,7 @@ module.exports = { }] } }, - 'sort': ['_score'], + 'sort': ['_score', '_id'], 'size': 20, 'track_scores': true }; diff --git a/test/unit/fixture/autocomplete_linguistic_one_char_token.js b/test/unit/fixture/autocomplete_linguistic_one_char_token.js index 7a4286910..b285bf0cf 100644 --- a/test/unit/fixture/autocomplete_linguistic_one_char_token.js +++ b/test/unit/fixture/autocomplete_linguistic_one_char_token.js @@ -78,7 +78,7 @@ module.exports = { }] } }, - 'sort': [ '_score' ], + 'sort': ['_score', '_id'], 'size': 20, 'track_scores': true }; diff --git a/test/unit/fixture/autocomplete_linguistic_only.js b/test/unit/fixture/autocomplete_linguistic_only.js index b8c50a99d..622e1e1ae 100644 --- a/test/unit/fixture/autocomplete_linguistic_only.js +++ b/test/unit/fixture/autocomplete_linguistic_only.js @@ -52,7 +52,7 @@ module.exports = { }] } }, - 'sort': [ '_score' ], + 'sort': ['_score', '_id'], 'size': 20, 'track_scores': true }; diff --git a/test/unit/fixture/autocomplete_linguistic_three_char_token.js b/test/unit/fixture/autocomplete_linguistic_three_char_token.js index 79b2dea27..2aa2b5cc2 100644 --- a/test/unit/fixture/autocomplete_linguistic_three_char_token.js +++ b/test/unit/fixture/autocomplete_linguistic_three_char_token.js @@ -52,7 +52,7 @@ module.exports = { }] } }, - 'sort': [ '_score' ], + 'sort': ['_score', '_id'], 'size': 20, 'track_scores': true }; diff --git a/test/unit/fixture/autocomplete_linguistic_two_char_token.js b/test/unit/fixture/autocomplete_linguistic_two_char_token.js index b95dafacd..01133f6a6 100644 --- a/test/unit/fixture/autocomplete_linguistic_two_char_token.js +++ b/test/unit/fixture/autocomplete_linguistic_two_char_token.js @@ -78,7 +78,7 @@ module.exports = { }] } }, - 'sort': [ '_score' ], + 'sort': ['_score', '_id'], 'size': 20, 'track_scores': true }; diff --git a/test/unit/fixture/autocomplete_linguistic_with_admin.js b/test/unit/fixture/autocomplete_linguistic_with_admin.js index e162915fb..39771c435 100644 --- a/test/unit/fixture/autocomplete_linguistic_with_admin.js +++ b/test/unit/fixture/autocomplete_linguistic_with_admin.js @@ -82,7 +82,5 @@ module.exports = { }, 'size': 20, 'track_scores': true, - 'sort': [ - '_score' - ] + 'sort': ['_score', '_id'], }; diff --git a/test/unit/fixture/autocomplete_single_character_street.js b/test/unit/fixture/autocomplete_single_character_street.js index 1c7e421e2..e2b749970 100644 --- a/test/unit/fixture/autocomplete_single_character_street.js +++ b/test/unit/fixture/autocomplete_single_character_street.js @@ -71,7 +71,7 @@ module.exports = { }] } }, - 'sort': [ '_score' ], + 'sort': ['_score', '_id'], 'size': 20, 'track_scores': true }; diff --git a/test/unit/fixture/autocomplete_with_category_filtering.js b/test/unit/fixture/autocomplete_with_category_filtering.js index 5ee33d85a..239600ff0 100644 --- a/test/unit/fixture/autocomplete_with_category_filtering.js +++ b/test/unit/fixture/autocomplete_with_category_filtering.js @@ -57,7 +57,7 @@ module.exports = { }] } }, - 'sort': ['_score'], + 'sort': ['_score', '_id'], 'size': 20, 'track_scores': true }; diff --git a/test/unit/fixture/autocomplete_with_layer_filtering.js b/test/unit/fixture/autocomplete_with_layer_filtering.js index 916e5925a..15ff906f7 100644 --- a/test/unit/fixture/autocomplete_with_layer_filtering.js +++ b/test/unit/fixture/autocomplete_with_layer_filtering.js @@ -57,7 +57,7 @@ module.exports = { }] } }, - 'sort': [ '_score' ], + 'sort': ['_score', '_id'], 'size': 20, 'track_scores': true }; diff --git a/test/unit/fixture/autocomplete_with_source_filtering.js b/test/unit/fixture/autocomplete_with_source_filtering.js index af3eea8c2..836fbd72e 100644 --- a/test/unit/fixture/autocomplete_with_source_filtering.js +++ b/test/unit/fixture/autocomplete_with_source_filtering.js @@ -57,7 +57,7 @@ module.exports = { }] } }, - 'sort': [ '_score' ], + 'sort': ['_score', '_id'], 'size': 20, 'track_scores': true }; diff --git a/test/unit/fixture/search_boundary_country.js b/test/unit/fixture/search_boundary_country.js index 9d166f591..964a5cdec 100644 --- a/test/unit/fixture/search_boundary_country.js +++ b/test/unit/fixture/search_boundary_country.js @@ -77,7 +77,5 @@ module.exports = { }, 'size': 10, 'track_scores': true, - 'sort': [ - '_score' - ] + 'sort': ['_score', '_id'], }; diff --git a/test/unit/fixture/search_boundary_country_multi.js b/test/unit/fixture/search_boundary_country_multi.js index 3db080217..32d51cbec 100644 --- a/test/unit/fixture/search_boundary_country_multi.js +++ b/test/unit/fixture/search_boundary_country_multi.js @@ -77,7 +77,5 @@ module.exports = { }, 'size': 10, 'track_scores': true, - 'sort': [ - '_score' - ] + 'sort': ['_score', '_id'], }; diff --git a/test/unit/fixture/search_boundary_gid.js b/test/unit/fixture/search_boundary_gid.js index 4612775fb..163a486af 100644 --- a/test/unit/fixture/search_boundary_gid.js +++ b/test/unit/fixture/search_boundary_gid.js @@ -70,7 +70,5 @@ module.exports = { }, 'size': 20, 'track_scores': true, - 'sort': [ - '_score' - ] + 'sort': ['_score', '_id'], }; diff --git a/test/unit/fixture/search_fallback.js b/test/unit/fixture/search_fallback.js index 11943e72b..64339c82a 100644 --- a/test/unit/fixture/search_fallback.js +++ b/test/unit/fixture/search_fallback.js @@ -866,7 +866,5 @@ module.exports = { }, 'size': 20, 'track_scores': true, - 'sort': [ - '_score' - ] + 'sort': ['_score', '_id'], }; diff --git a/test/unit/fixture/search_fallback_postalcode_only.js b/test/unit/fixture/search_fallback_postalcode_only.js index 76b2dbbfa..a88907702 100644 --- a/test/unit/fixture/search_fallback_postalcode_only.js +++ b/test/unit/fixture/search_fallback_postalcode_only.js @@ -54,7 +54,5 @@ module.exports = { }, 'size': 20, 'track_scores': true, - 'sort': [ - '_score' - ] + 'sort': ['_score', '_id'], }; diff --git a/test/unit/fixture/search_linguistic_bbox.js b/test/unit/fixture/search_linguistic_bbox.js index 9356ec2bc..16a5a59c6 100644 --- a/test/unit/fixture/search_linguistic_bbox.js +++ b/test/unit/fixture/search_linguistic_bbox.js @@ -80,7 +80,5 @@ module.exports = { }, 'size': 10, 'track_scores': true, - 'sort': [ - '_score' - ] + 'sort': ['_score', '_id'], }; diff --git a/test/unit/fixture/search_linguistic_focus.js b/test/unit/fixture/search_linguistic_focus.js index 1a79087cf..0555b9726 100644 --- a/test/unit/fixture/search_linguistic_focus.js +++ b/test/unit/fixture/search_linguistic_focus.js @@ -83,7 +83,5 @@ module.exports = { }, 'size': 10, 'track_scores': true, - 'sort': [ - '_score' - ] + 'sort': ['_score', '_id'], }; diff --git a/test/unit/fixture/search_linguistic_focus_bbox.js b/test/unit/fixture/search_linguistic_focus_bbox.js index 565c7527e..1bd7833ca 100644 --- a/test/unit/fixture/search_linguistic_focus_bbox.js +++ b/test/unit/fixture/search_linguistic_focus_bbox.js @@ -94,7 +94,5 @@ module.exports = { }, 'size': 10, 'track_scores': true, - 'sort': [ - '_score' - ] + 'sort': ['_score', '_id'], }; diff --git a/test/unit/fixture/search_linguistic_focus_null_island.js b/test/unit/fixture/search_linguistic_focus_null_island.js index c0b5a3911..32a8f1b4d 100644 --- a/test/unit/fixture/search_linguistic_focus_null_island.js +++ b/test/unit/fixture/search_linguistic_focus_null_island.js @@ -83,7 +83,5 @@ module.exports = { }, 'size': 10, 'track_scores': true, - 'sort': [ - '_score' - ] + 'sort': ['_score', '_id'], }; diff --git a/test/unit/fixture/search_linguistic_only.js b/test/unit/fixture/search_linguistic_only.js index e6bb9fedd..dfb9484fd 100644 --- a/test/unit/fixture/search_linguistic_only.js +++ b/test/unit/fixture/search_linguistic_only.js @@ -69,7 +69,5 @@ module.exports = { }, 'size': 10, 'track_scores': true, - 'sort': [ - '_score' - ] + 'sort': ['_score', '_id'], }; diff --git a/test/unit/fixture/search_pelias_parser_boundary_country.js b/test/unit/fixture/search_pelias_parser_boundary_country.js index 7e3ecd8f2..27d2a9848 100644 --- a/test/unit/fixture/search_pelias_parser_boundary_country.js +++ b/test/unit/fixture/search_pelias_parser_boundary_country.js @@ -75,7 +75,7 @@ module.exports = { ] } }, - 'sort': [ '_score' ], + 'sort': ['_score', '_id'], 'size': 10, 'track_scores': true }; diff --git a/test/unit/fixture/search_pelias_parser_boundary_gid.js b/test/unit/fixture/search_pelias_parser_boundary_gid.js index 5cd2d37dd..da65f32e1 100644 --- a/test/unit/fixture/search_pelias_parser_boundary_gid.js +++ b/test/unit/fixture/search_pelias_parser_boundary_gid.js @@ -75,7 +75,7 @@ module.exports = { ] } }, - 'sort': [ '_score' ], + 'sort': ['_score', '_id'], 'size': 10, 'track_scores': true }; diff --git a/test/unit/fixture/search_pelias_parser_full_address.js b/test/unit/fixture/search_pelias_parser_full_address.js index c7711bc11..afe7417e3 100644 --- a/test/unit/fixture/search_pelias_parser_full_address.js +++ b/test/unit/fixture/search_pelias_parser_full_address.js @@ -119,6 +119,6 @@ module.exports = { } }, 'size': 10, - 'sort': [ '_score' ], + 'sort': ['_score', '_id'], 'track_scores': true }; diff --git a/test/unit/fixture/search_pelias_parser_linguistic_bbox.js b/test/unit/fixture/search_pelias_parser_linguistic_bbox.js index 39feba566..629ec809a 100644 --- a/test/unit/fixture/search_pelias_parser_linguistic_bbox.js +++ b/test/unit/fixture/search_pelias_parser_linguistic_bbox.js @@ -74,7 +74,7 @@ module.exports = { }] } }, - 'sort': [ '_score' ], + 'sort': ['_score', '_id'], 'size': 10, 'track_scores': true }; diff --git a/test/unit/fixture/search_pelias_parser_linguistic_focus.js b/test/unit/fixture/search_pelias_parser_linguistic_focus.js index 8b192309c..20a0b8d88 100644 --- a/test/unit/fixture/search_pelias_parser_linguistic_focus.js +++ b/test/unit/fixture/search_pelias_parser_linguistic_focus.js @@ -87,7 +87,7 @@ module.exports = { ] } }, - 'sort': [ '_score' ], + 'sort': ['_score', '_id'], 'size': 10, 'track_scores': true }; diff --git a/test/unit/fixture/search_pelias_parser_linguistic_focus_bbox.js b/test/unit/fixture/search_pelias_parser_linguistic_focus_bbox.js index c4ecb50a3..b9921036c 100644 --- a/test/unit/fixture/search_pelias_parser_linguistic_focus_bbox.js +++ b/test/unit/fixture/search_pelias_parser_linguistic_focus_bbox.js @@ -96,7 +96,7 @@ module.exports = { }] } }, - 'sort': [ '_score' ], + 'sort': ['_score', '_id'], 'size': 10, 'track_scores': true }; diff --git a/test/unit/fixture/search_pelias_parser_linguistic_focus_null_island.js b/test/unit/fixture/search_pelias_parser_linguistic_focus_null_island.js index 28b00a673..0ae052933 100644 --- a/test/unit/fixture/search_pelias_parser_linguistic_focus_null_island.js +++ b/test/unit/fixture/search_pelias_parser_linguistic_focus_null_island.js @@ -85,7 +85,7 @@ module.exports = { }] } }, - 'sort': [ '_score' ], + 'sort': ['_score', '_id'], 'size': 10, 'track_scores': true }; diff --git a/test/unit/fixture/search_pelias_parser_linguistic_only.js b/test/unit/fixture/search_pelias_parser_linguistic_only.js index ca65cf263..8608313f4 100644 --- a/test/unit/fixture/search_pelias_parser_linguistic_only.js +++ b/test/unit/fixture/search_pelias_parser_linguistic_only.js @@ -65,7 +65,7 @@ module.exports = { ] } }, - 'sort': [ '_score' ], + 'sort': ['_score', '_id'], 'size': 10, 'track_scores': true }; diff --git a/test/unit/fixture/search_pelias_parser_partial_address.js b/test/unit/fixture/search_pelias_parser_partial_address.js index 08addbb2e..e721c51a3 100644 --- a/test/unit/fixture/search_pelias_parser_partial_address.js +++ b/test/unit/fixture/search_pelias_parser_partial_address.js @@ -91,6 +91,6 @@ module.exports = { } }, 'size': 10, - 'sort': [ '_score' ], + 'sort': ['_score', '_id'], 'track_scores': true }; diff --git a/test/unit/fixture/search_pelias_parser_regions_address.js b/test/unit/fixture/search_pelias_parser_regions_address.js index 0228a59ed..1cbeda7b2 100644 --- a/test/unit/fixture/search_pelias_parser_regions_address.js +++ b/test/unit/fixture/search_pelias_parser_regions_address.js @@ -109,6 +109,6 @@ module.exports = { } }, 'size': 10, - 'sort': [ '_score' ], + 'sort': ['_score', '_id'], 'track_scores': true }; diff --git a/test/unit/fixture/search_pelias_parser_with_category_filtering.js b/test/unit/fixture/search_pelias_parser_with_category_filtering.js index 9aa4f4c42..52ee03e15 100644 --- a/test/unit/fixture/search_pelias_parser_with_category_filtering.js +++ b/test/unit/fixture/search_pelias_parser_with_category_filtering.js @@ -63,7 +63,5 @@ module.exports = { }, 'size': 20, 'track_scores': true, - 'sort': [ - '_score' - ] + 'sort': ['_score', '_id'], }; diff --git a/test/unit/fixture/search_pelias_parser_with_source_filtering.js b/test/unit/fixture/search_pelias_parser_with_source_filtering.js index 4186b19d5..75c6f1bf2 100644 --- a/test/unit/fixture/search_pelias_parser_with_source_filtering.js +++ b/test/unit/fixture/search_pelias_parser_with_source_filtering.js @@ -61,7 +61,7 @@ module.exports = { }] } }, - 'sort': [ '_score' ], + 'sort': ['_score', '_id'], 'size': 20, 'track_scores': true }; diff --git a/test/unit/fixture/search_with_category_filtering.js b/test/unit/fixture/search_with_category_filtering.js index 2dc967636..932141b0c 100644 --- a/test/unit/fixture/search_with_category_filtering.js +++ b/test/unit/fixture/search_with_category_filtering.js @@ -70,7 +70,5 @@ module.exports = { }, 'size': 20, 'track_scores': true, - 'sort': [ - '_score' - ] + 'sort': ['_score', '_id'], }; diff --git a/test/unit/fixture/search_with_custom_boosts.json b/test/unit/fixture/search_with_custom_boosts.json index 924fda28a..95bb76740 100644 --- a/test/unit/fixture/search_with_custom_boosts.json +++ b/test/unit/fixture/search_with_custom_boosts.json @@ -84,7 +84,7 @@ }] } }, - "sort": [ "_score" ], + "sort": [ "_score", "_id" ], "size": 10, "track_scores": true } diff --git a/test/unit/fixture/search_with_source_filtering.js b/test/unit/fixture/search_with_source_filtering.js index e2198f35d..782a3ae37 100644 --- a/test/unit/fixture/search_with_source_filtering.js +++ b/test/unit/fixture/search_with_source_filtering.js @@ -69,7 +69,5 @@ module.exports = { }, 'size': 20, 'track_scores': true, - 'sort': [ - '_score' - ] + 'sort': ['_score', '_id'] };