Large number of facets slow down the filter query

Hi All,

Here is my case,

  1. Prepare the index :
    https://gist.github.com/hui1103/5442389#file-prepare-the-index

  2. Normal query :
    https://gist.github.com/hui1103/5442389#file-normal-query
    running such normal(just a few facets) requires less than 10ms.

  3. Problem query :
    https://gist.github.com/hui1103/5442389#file-problem-query
    when facet become more and more(>999) and the query requires more than
    1000ms.

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

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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hi,

I have found the following thread ,

​http://elasticsearch-users.115913.n3.nabble.com/Performance-killed-when-faceting-on-high-cardinality-fields-td4007161.html

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)...