Using Sitecore 9.2 with Solr on SearchStax. We have the Query.MaxItems value patched to 0, so finding a limit returned of 100 items is unexpected. We're setting up a number of dropdowns, using this code to get the values as facets:

var resultsFacets = repository.SearchByPredicate(query)
            .FacetOn(x => x.Schools, minCount)

Followed by this call:

FacetCategory schools = resultsFacets.Facets.Categories.FirstOrDefault(a => a.Name.Equals("schools", StringComparison.OrdinalIgnoreCase));

There's some additional code that assembles it into the dropdown list, but this search code is what's returning the values, and again only 100. So what I can't figure is why I'm only getting 100 items, if there's another setting that needs overriding to bypass a 100 result limit because of the facets call?

1 Answer 1



Solr has a limit on the number of facets - which has nothing to do with the Query.MaxItems btw (that is for Sitecore queries). You should be able to set facet.limit to -1 to get all results.

Not sure if in the current implementation by Sitecore there is another solution possible already, but this was given at the community site answer mentioned above:

On your Solr Server, edit the solrconfig.xml for the index you are using. It is found in the conf folder of your index.

Find the requesthandler you are using, for instance "/select", and add -1. Be aware that you have to do this for each index that you want to update.

For me it looks like this after the fix:

<requestHandler name="/select" class="solr.SearchHandler"> 
<!-- default values for query parameters can be specified, these will be
overridden by parameters in the request --> 
<lst name="defaults"> 
<str name="echoParams">explicit</str> 
<int name="rows">10</int> 
<str name="df">text</str> 
<str name="facet.limit">-1</str> 

One more blog with the same solution explained: https://blog.ryanbailey.co.nz/2018/07/sitecore-experience-commerce-facets-are.html

  • My hunting and pecking seems to suggest this as well. Since it's SearchStax I think we'll have to open a support ticket to make the change. Thanks! Jul 10, 2020 at 13:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.