Closed (fixed)
Project:
Apache Solr Search
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
14 Jul 2011 at 20:20 UTC
Updated:
4 Jan 2014 at 01:11 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
cpliakas commentedThe attached patch integrates with the new feature.
Comment #2
pwolanin commentedI thought I was already adding a mincount of 1 elsewhere?
Comment #3
cpliakas commentedYou are adding it in the adapter's initActiveFilters() method. This patch allows users to override that value for selected facets through the interface. For example, if they want a mincount of 10 then they would set that in the facet's "global settings" via the Facet API interface.
Comment #4
cpliakas commentedThe attached screenshot further illustrates the feature request and what the patch accomplishes.
Comment #5
Ravi.J commentedThis is a great feature to have. I guess value zero (0) for Minimum facet count would mean there in no limit and display all facets.
Comment #6
pwolanin commentedNo, zero rather means the facet blcok displays even if there are zero results for that facets (I think).
The mincount is quite different from the facet limit, which was already configurable.
Comment #7
cpliakas commentedA value of 0 means that all available facets are displayed even if their count is zero. In many cases this is not useful and is not supported by some backends, so Facet API requires that a positive integer be passed. In addition, it defaults to 1 like the current Apache Solr Search Integration implementation.
If for some reason the backend wanted to allow a value of 0, it would simply have to form alter the settings form and change the validation callback for the element.
Comment #8
cpliakas commentedChanging title to more accurately reflect the feature request.
Comment #9
cpliakas commentedInteresting. Found an example where a mincount of "0" is being used with a pretty cool effect. The attached screenshot was taken from http://www.lucidimagination.com/search/.
Comment #10
cpliakas commentedPosted a corresponding issue against Facet API #1222834: Allow for a mincount of 0. The patch in #1 is not dependent on the resolution of this issue in any way. This is more of a sidetrack based on my comment in #6.
Comment #11
pwolanin commentedPatch looks fine - commit it if you're satisfied it works.
Comment #12
cpliakas commentedSeems to work well for me. Committed at 740b4ca.
Comment #13
cpliakas commentedQuick follow-up commit at 6878a6d.