_search supports a random_sampler aggregation which makes it easy to reduce the result set for heavier aggregations, like categorize_text. A SAMPLE function in ES|QL could serve a similar purpose. Without it, heavy aggregations are hard to use because they need to operate on the full data set.
A SAMPLE function will also allow quicker rendering in the UI, giving powerful speedups for example
quick visualizations where user prefers responsiveness over accuracy, e.g. authoring visuals or authoring ES|QL statements or quick field stats checks or during initial investigations
quick initial loading for visuals (which can be sharpened more accurately in the background)
quick visualizations where lower accuracy is sufficient e.g. sparklines
Description
_search supports a
random_sampler
aggregation which makes it easy to reduce the result set for heavier aggregations, likecategorize_text
. ASAMPLE
function in ES|QL could serve a similar purpose. Without it, heavy aggregations are hard to use because they need to operate on the full data set.