1

If I am running an aggregation against a query - will the results be accurate? Is the doc_count inaccurate only when there is no query? aggregation accuracy

1 Answer 1

1

To get accurate aggregation document count, you can explicitly set the size parameter to 0. See this for more information. But mind you, this is more expensive.

Sign up to request clarification or add additional context in comments.

5 Comments

so, by default, if I have an aggregation ran against a query and specify the size, then I can get results that are not accurate?
that is the same link I gave in my question - but there is the plain aggregation. would it be the same behavior if the aggregation is 'activated' in the context of a query?
What do you mean by "aggregation activated in the context of a query"? Can you explain with a simple example please?
{query: {some query}, aggs{}}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.