When you dont want a limit on facets, you currently cant do that beside touching the code. That option would help

CommentFileSizeAuthor
#6 facetapi-no-hard-limit.patch975 bytesnkschaefer
#1 843616.patch1.15 KBjpmckinney

Comments

jpmckinney’s picture

Title: Introduce -1 to the limits for facets ( block configuration ui ) » Ad -1 to possible values for facet query limit
Version: 6.x-2.0-beta2 » 7.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new1.15 KB
pwolanin’s picture

Project: Apache Solr Search » Facet API
Status: Needs review » Needs work

Needs to be reworked for facet API module's UI

cpliakas’s picture

There would have to be modification of the Facet API code to add the value to the dropdown, then there would have to be coordination with the Apache Solr module's query type plugins to support the -1 as an unlimited value.

cpliakas’s picture

Title: Ad -1 to possible values for facet query limit » Add a "no limit" option to the hard limit setting

Changing title to use Facet API nomenclature.

cpliakas’s picture

Issue tags: +low hanging fruit

Adding "low hanging fruit" tag.

nkschaefer’s picture

Component: User interface » Code (functionality)
StatusFileSize
new975 bytes

I started looking at this, expecting to do a fair amount of work. I'm using Search API, though, and it looks like Search API and the Solr backend already work without hard limits on facets (they check if the facet hard limit is true, so either 0 or -1 should work for a "no limit" setting).

Based on what cpliakas said, I made the "no limit" setting == -1.

Here's a patch that adds the form option. Let me know if there's anything else I can help with.

nkschaefer’s picture

Component: Code (functionality) » User interface (functionality)
Status: Needs work » Needs review

Oops - don't know how that setting got changed.

cpliakas’s picture

Status: Fixed » Reviewed & tested by the community

How this works is that the -1 is passed as the facet.limit parameter to Solr. Looking at the documentation page at http://wiki.apache.org/solr/SimpleFacetParameters#facet.limit, a negative value means unlimited results. Therefore it works exactly as expected. This does have a Solr assumption, however I would bet Search API is smart enough to handle this for all backends. Marking as RTBC.

Thanks for the contribution,
Chris

cpliakas’s picture

Status: Needs review » Fixed

Committed at 19d2b4b.

Status: Reviewed & tested by the community » Closed (fixed)
Issue tags: -low hanging fruit

Automatically closed -- issue fixed for 2 weeks with no activity.