fix(search): Apply SearchFlags passed in through to scroll queries #9041
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.
In some scroll across lineage queries, the query fails with a 500 from ElasticSearch due to
"reason" : "too_complex_to_determinize_exception: Determinizing automaton with 106128 states and 106127 transitions would result in more than 10000 states."
The query has highlighting turned on even though highlighting is not used for this functionality, and in fact, the search flags in the lineage search service have highlighting turned off. This is because the search flags are not properly passed through to the query construction. This PR is to set up passing these flags through.
Tested in quickstart by capturing the query and assuring that it did not have the highlighting part in it.
Tested that this would resolve the issue by capturing the ElasticSearch query and reproducing the error, then removing the highlighting block. The query ran successfully without it.
Checklist