There is a set of terms. I want to know which ones are present in the search results and I use term aggregation for this purpose.
Is there some way to limit the number of documents for each bucket in term aggregation in order to improve performance?
All I want to know is if there is at least one document containing term. I don't need to count the number of documents for each term.
Or maybe there is another more efficient way to solve this problem?