Elastic has identified a query-correctness defect in Elasticsearch 9.5.0 that can cause searches to return inaccurate results. Queries using must_not clauses may fail to exclude documents when the targeted field has doc values enabled but indexing disabled. Affected searches can return documents that should have been excluded and report higher document counts than expected, with results varying between query runs. No error is raised, so affected queries appear to succeed.
Elasticsearch is a widely-used search and analytics engine that powers dashboards, alerting systems, and data analysis across enterprises and developers worldwide.
The defect affects Elasticsearch 9.5.0 on Elastic Cloud Hosted, Elastic Cloud Enterprise, self-managed deployments, and Elasticsearch Serverless projects. Time-series data streams and columnar indices in technical preview are most likely affected. Elasticsearch 9.4.x and earlier versions are not impacted. Cluster availability, connectivity, and data ingestion are unaffected. Elastic recommends deferring upgrades to 9.5.0 and says a patch release is in progress, with an update expected by 10:00 UTC August 6.
This is a developing story. We will provide updates as more information becomes available.