Open TatianaNeuer opened 1 month ago
The doc test_index-id-doc1
and test_index-id-doc6
is on the same shard, so the MinAndMax
value of field name
on this shard is bob
(doc6 has no name
field). If we set track_total_hits=false
, the search_after
param will be took into consideration during can match phase. Because the MinAndMax
of the shard is larger than search_after
value ana
, this shard will be filtered due to cannot match. I think we should take missing value into consideration during can match phase. I can help to fix this issue.
Describe the bug
In some cases, a search request with "search_after" and "track_total_hits=false" does not return all expected documents, some documents are missing.
Related component
Search
To Reproduce
{ "size": 20, "track_total_hits": false, "sort": [ { "name.keyword": { "order": "desc" } }, { "docNb.keyword": { "order": "asc" } } ], "search_after": [ "ana", "doc4" ] }
version: '3' services: opensearch: image: opensearchproject/opensearch:2.15.0 container_name: opensearch environment:
volumes: opensearch:
networks: opensearch-net: