From ba01f1d0f43bc9720bfae1d6b22bd567d84d6808 Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Fri, 27 Nov 2026 12:25:05 +0100 Subject: [PATCH] test(search): pin a fractional filter key on a whole-number field Both engines answer a term filter of 1.5 on Size with no match and no error; OpenSearch does not reject it on its long mapping. --- services/search/pkg/parity/README.md | 1 + services/search/pkg/parity/aggregations_test.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/services/search/pkg/parity/README.md b/services/search/pkg/parity/README.md index 91b9189281..a676790629 100644 --- a/services/search/pkg/parity/README.md +++ b/services/search/pkg/parity/README.md @@ -880,6 +880,7 @@ Fixtures: | AGG-21 | `mediatype:image` reads `a metric without a single value has none` | audio.year avg none, audio.year min none, audio.year sum none | audio.year avg none, audio.year min none, audio.year sum none | audio.year avg none, audio.year min none, audio.year sum none | ✅ | | AGG-22 | `mediatype:audio` reads `filtered to the Saxon bucket, as many matches as the bucket counted` | a.mp3, audio.artist Saxon=2, b.mp3 | a.mp3, audio.artist Saxon=2, b.mp3 | a.mp3, audio.artist Saxon=2, b.mp3 | ✅ | | AGG-23 | `mediatype:audio` reads `filtered to saxon, a bucket key matches case-sensitively` | no match | no match | no match | ✅ | +| AGG-46 | `mediatype:audio` reads `filtered to a fractional key on a whole-number field, no match and no error` | no match | no match | no match | ✅ | | AGG-24 | `mediatype:audio` reads `filtered to the Saxon or the Motörhead bucket` | a.mp3, b.mp3, c.mp3, d.mp3, e.mp3 | a.mp3, b.mp3, c.mp3, d.mp3, e.mp3 | a.mp3, b.mp3, c.mp3, d.mp3, e.mp3 | ✅ | | AGG-25 | `mediatype:audio` reads `filtered to audio.year 1980-1990` | c.mp3 | c.mp3 | c.mp3 | ✅ | | AGG-26 | `mediatype:audio` reads `filtered to audio.year 1982-1999, from-inclusive and to-exclusive` | c.mp3 | c.mp3 | c.mp3 | ✅ | diff --git a/services/search/pkg/parity/aggregations_test.go b/services/search/pkg/parity/aggregations_test.go index 84961685e8..2d32854eef 100644 --- a/services/search/pkg/parity/aggregations_test.go +++ b/services/search/pkg/parity/aggregations_test.go @@ -273,6 +273,8 @@ func aggregationCases() []aggCase { want: []string{"a.mp3", "b.mp3", "audio.artist Saxon=2"}}, {id: 23, query: "mediatype:audio", reads: "filtered to saxon, a bucket key matches case-sensitively", filters: []*searchService.AggregationFilter{terms("audio.artist", "saxon")}}, + {id: 46, query: "mediatype:audio", reads: "filtered to a fractional key on a whole-number field, no match and no error", + filters: []*searchService.AggregationFilter{terms("Size", "1.5")}}, {id: 24, query: "mediatype:audio", reads: "filtered to the Saxon or the Motörhead bucket", filters: []*searchService.AggregationFilter{terms("audio.artist", "Saxon", "Motörhead")}, want: []string{"a.mp3", "b.mp3", "c.mp3", "d.mp3", "e.mp3"}},