Large number of facets slow down the filter query

Hi All,

Here is my case,

  1. Prepare the index :

  2. Normal query :
    running such normal(just a few facets) requires less than 10ms.

  3. Problem query :
    when facet become more and more(>999) and the query requires more than

Can I ask is there any faster way for my filter query with large number of

Many Thanks

You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit


I have found the following thread ,


I am not sure if I can use the mentioned solution in the above thread.

the facet in this post is used to avoid the OOM which happens when facet on the high cardinality field under machine with less memory.

only the necesary tags are selected for facet(not all tag of the field)...