-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Flattened Field exists Query Issue with Dotted Sub-Field Names #17069
Comments
There are a lot of problems with the current flat_object implementation, but for compatibility reasons we need to address them in a new version, which is currently under development, you can refer to #16061. As for your exists query, this is because the current implementation uses an inverted index under |
hi @bugmakerrrrrr ,
Is this referring to the implementation here, #16802 |
@bugmakerrrrrr |
@bugmakerrrrrr Are you planning out the fix for 2.19? In that case, please take into account 2.19 code freeze on 1/28/2025. |
Describe the bug
We have encountered a discrepancy between Elasticsearch and OpenSearch when querying exists on flattened fields with dotted sub-field names.
related topic #11425
Related component
Search:Query Capabilities
To Reproduce
Expected behavior
The query should return the indexed document, as the field
earth.american.north
exists in the document.Observed Behavior
In Elasticsearch (7.10): The query returns the expected document.
In OpenSearch (2.18): The query does not return any results.
Additional Details
Analysis
The issue appears to be related to how OpenSearch handles exists queries on flattened fields with dotted sub-field names. Specifically:
exists
onearth.american.north
does not behave as expected.term
queries, where such fields work correctly, as it supported in this PR Fix parsing of flat object fields with dots in keys #11425american.north
is not supported.Impact
We are migrating our service from Elasticsearch 7.10 to Opensearch. This behavior prevents certain queries from functioning correctly, potentially affecting applications relying on exists queries for flattened fields.
Request
We kindly request the community to investigate this issue. If this behavior is by design, clarification in the documentation would be helpful. If it is a bug, we hope for a fix or a recommended workaround.
Thank you for your assistance!
The text was updated successfully, but these errors were encountered: