You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The result contains 7 documents instead of 8. Execute the previous request with "track_total_hits": true and the results contains the correct number of documents.
Expected behavior
A request with "search_after" and "track_total_hits:false" should return the correct number of documents.
Additional Details
Host/Environment (please complete the following information):
OS: Windows 10 with WSL2 and docker
Version : docker image: opensearchproject/opensearch:2.15.0
1 opensearch node run with the following docker compose file:
version: '3'
services:
opensearch:
image: opensearchproject/opensearch:2.15.0
container_name: opensearch
environment:
- cluster.name=opensearch-cluster # Name the cluster
- node.name=opensearch # Name the node that will run in this container
- discovery.seed_hosts=opensearch # Nodes to look for when discovering the cluster
- cluster.initial_cluster_manager_nodes=opensearch # Nodes eligibile to serve as cluster manager
- bootstrap.memory_lock=true # Disable JVM heap memory swapping
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" # Set min and max JVM heap sizes to at least 50% of system RAM
- "DISABLE_INSTALL_DEMO_CONFIG=true" # Prevents execution of bundled demo script which installs demo certificates and security configurations to OpenSearch
- "DISABLE_SECURITY_PLUGIN=true" # Disables Security plugin
ulimits:
memlock:
soft: -1 # Set memlock to unlimited (no soft or hard limit)
hard: -1
nofile:
soft: 65536 # Maximum number of open files for the opensearch user - set to at least 65536
hard: 65536
volumes:
- opensearch:/usr/share/opensearch/data # Creates volume called opensearch-data1 and mounts it to the container
ports:
- 9200:9200 # REST API
- 9600:9600 # Performance Analyzer
networks:
- opensearch-net # All of the containers will join the same Docker bridge network
volumes:
opensearch:
networks:
opensearch-net:
The text was updated successfully, but these errors were encountered:
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
PUT /test_index
POST /_bulk
GET /test_index/_search
Expected behavior
A request with "search_after" and "track_total_hits:false" should return the correct number of documents.
Additional Details
Host/Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: