fix(search): fixes issue where exact match exclusive flag broke quoted structured search #10690
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to this issue: #10505
We found that enabling the flag
ELASTICSEARCH_QUERY_EXACT_MATCH_EXCLUSIVE
resolved the problem where quoted search with_
or-
had no effect. However, enabling this flag broke structured queries tat had quotes (which are needed if the search string contains a space) due to the check that has been removed by this PR.It seems that this logic isn't intended and was just an artifact of modeling the function
getStructuredQuery
after thegetSimpleQuery
function:datahub/metadata-io/src/main/java/com/linkedin/metadata/search/elasticsearch/query/request/SearchQueryBuilder.java
Line 321 in 3a72d92
Checklist