How well does Solr scale over a large number of face values?

I am using Solr and I want to get a face above the "group" field.

Since the “group” is created by users, there can potentially exist a huge number of values ​​for the “group”.

  • Will Solr handle this use case? Or is Solr not suitable for facet fields with many values?

  • I understand that I can set facet.limit to limit the number of returned values ​​for the facet field. Would that help in my case? Let's say that 100,000 matching values ​​for a “group” in the search, if I set facet.limit to 50. Will it speed up the query or will it still be slow because Solr still needs to process and sort all the facet values ​​and return the top 50?

  • Any tips for setting up Solr for a lot of facet values?

Thanks.

+7
search full-text-search lucene solr facet
source share
2 answers

Starting from 1.4, solr handles faces with a large number of values ​​perfectly, since by default a simple number of facets is used. (by default, facet.method is "fc").

Prior to 1.4, solr used a filter-based facet method (enum), which is certainly faster for cutting an attribute with few values. This method requires one filter per facet.

About facet.limit, think of it as a way to navigate the facet space (in conjunction with facet.offset), for example, you navigate through the resulting space with lines / offset. Therefore, a value of 10 ~ 50 is reasonable.

As with lines / offsets, and due to the nature of Solr, you can expect that the performance of facet.limit / facet.offset will degrade when the offset gets larger, but should be fine if you stay within reasonable limits.

By default, solr produces more frequent faces first.

Summarizing:

  • Use Solr 1.4

  • Make sure facet.method is "fc" (well, by default, anyway).

  • Go through the facet space with facet.limit / facet.offset.

+7
source share

Don’t pay attention to us in order to enable the cache related boundary parameters (try different cache sizes to choose values ​​that suit your system well):

<filterCache class="solr.FastLRUCache" size="4096" initialSize="4096" autowarmCount="4096"/> <queryResultCache class="solr.LRUCache" size="5000" initialSize="5000" autowarmCount="5000"/> 
+1
source share

All Articles