Enforce minimum hit count on all queries by default

Our ES index consists of user records with "Personally identifiable information"(PII). And all the data is supposed to be queried only at the aggregated level.
We currently ask all our clients to include min_doc_count in the terms aggregation. However, we are looking for a possibility of enforcing some threshold by default. So if the terms aggregation doesn't have a min_doc_count defined, we would want to enforce it with minimum hit count threshold.
Is this possible via a index/cluster level config or as a filtered alias or something ?


Can someone respond to this plz ?

Read this and specifically the "Also be patient" part.

At least wait for 2 or 3 days before asking again. Thanks.

We are planning to write custom REST end points and extend RestResponseListener, where we parse the response and if the hits is less than our configured threshold, we send empty response to the client with a message.
Something on the lines of this CSV implementation.
Downside is that we have to wait for the full request execution, before we make the call on hits threshold.
Please let me know if any alternatives are possible.


This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.