Currently the soft limit for facets is 0 based. That means that "no limit" maps to 0 and the facet will always need to display a minimal number of facet options in order to hide the remaining facet options. The soft limit should be changed to be -1 based, so that a user could select 0 as the soft limit. A soft limit of 0 would mean that the face would appear, but not show any facet options until the "show more" link was clicked. This is particularly useful on sites that have a very large number of facets.
For example, the current 0 based facet with soft limit 0 shows:
Facet Name
- One (999)
- Two (888)
- ...
- Ten (777)
Where with a -1 based soft limit, the above would represent the -1 setting, with the following representing the 0 setting:
Facet Name
Show Options
Hopefully that makes sense.
Comment | File | Size | Author |
---|---|---|---|
#6 | change-soft_limit-value-1821250-6.patch | 3.38 KB | rimen |
#5 | change-soft_limit-value-1821250-5.patch | 3.26 KB | heshanlk |
#4 | Screen Shot 2014-07-07 at 3.24.55 PM.png | 19.6 KB | cpliakas |
Comments
Comment #1
cpliakas CreditAttribution: cpliakas commentedHi jyee.
Interesting use case, and thanks for sharing. This seems inline with how some of the other settings work, and I would be in favor of this change. The tricky part will be the update scripts that will change the saved settings from 0 to -1, but it should be doable. Would love to see a patch for this if anyone wants to try and tackle it.
Thanks for posting,
Chris
Comment #2
robinvdvleuten CreditAttribution: robinvdvleuten commentedHi jyee,
Do you have a patch for this functionality? Otherwise I would give it a try.
Cheers,
Robin
Comment #3
robinvdvleuten CreditAttribution: robinvdvleuten commentedI've created a quick patch that changes the 'no limit' value from 0 to -1.
Comment #4
cpliakas CreditAttribution: cpliakas commentedThanks for the contribution!
Marking as needs work because the update script didn't work on my installation and the setting doesn't work as expected. More specifically, a single item is displayed. See the screenshot below for a facet configured with a soft limit of "0".
Comment #5
heshanlkModified @robinvdvleuten's patch to allow what mentioned by @cpliakas, so here it is.
Comment #6
rimen CreditAttribution: rimen as a volunteer commentedUpdated patch to current dev