1

I have a requirement to limit search results to an arbitrary number in a Site Search implementation. Is there a way to accomplish this in a query and get accurate facets relative to the arbitrary search result cap?

For example if a full result set is 350 items, using the FacetOn() method I get all of the facets correctly. However, I want to limit my result set to 100 results. If I use Take(100) the facets are still relative to the full result set of 350. Is there a way to adjust the facets to match the hits that are actually taken? Or is there a way to set a search hit limit on a per-query basis?

bumped to the homepage by Community yesterday

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

0

You can set the facet in Indexing section of the item.

enter image description here

  • That's not quite what I'm looking for. I am trying to get a result set that is limited in quantity. I am using FacetOn() in order to get facets, and that works fine. For example, if solr returns 350 results, the facets that are returned are correct relative to those 350 results. The problem is that if do a Take(100) in the query, and then get results, the facets are still relative to the original 350. – Alex Tselevich Jun 18 at 14:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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