I am migrating an index from ES 7.2
to ES 8.7
. The index is used for percolation. Most queries work fine and return identical response from both clusters (queries are being made to both clusters paralelly and results are compared). However, range filters (or perc documents) in ES 8 cluster aren't working properly.
Percolation queries that return corresponding documents with range based filters from ES 7 cluster, ES8 cluster doesn't return same documents for same query.The documents in both indices are exactly the same, no missing documents.
The mapping is the same.
All the other filters i.e term/match based queries, work perfectly fine. The issue is only for range filters.What could be the potential issue here or something that I might be doing wrong?
A sample query along with a document it fails to return
sample query along with a document it fails to return
A sample query:
curl --location 'http://localhost:9200/my-index/_search?pretty=true' \
--header 'Content-Type: application/json' \
--data '{
"query": {
"bool": {
"filter": [
{"term": {"field": "abc"}},
{"term": {"perc_type": "xyz"}},
{
"percolate": {
"field": "query",
"document": {
"created_at": "2024-08-14T05:51:38.569Z"
}
}
}
]
}
},
"_source": false
}'
A document it fails to return:
{
"_index": "my-index",
"_id": "<id>",
"_version": 1,
"_seq_no": 1297,
"_primary_term": 3,
"found": true,
"_source": {
"field": "abc",
"perc_type": "xyz",
"query": {
"constant_score": {
"filter": {
"bool": {
"must": [
{
"bool": {
"filter": {
"range": {
"created_at": {
"gte": "now-1d",
"lte": "now"
}
}
}
}
}
]
}
}
}
}
}
}