ESQL: Compute engine support for tagged queries (#128521) #128638
Merged
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.
Begins adding support for running "tagged queries" to the compute engine. Here, it's just the
LuceneSourceOperator
because that's useful and contained.Example time! Say you are running:
It's often faster to run this as four queries:
0
100
1000
100000
This creates an ESQL operator that can run these queries, one after the other and attach those tags.
Aggs uses this trick and it's way faster when it can push down count queries, but it's still faster when it pushes doc loading things. This implementation in
LuceneSourceOperator
is quite similar to the doc loading version in _search.I don't have performance measurements yet because I haven't plugged this into the language. In _search we call this
filter-by-filter
and enable it when each group averages to more than 5000 documents and when there isn't an_doc_count
field. It's faster in those cases not to push. I expect we'll be pretty similar.