SOLR-2850: Do not refine facets when minCount == 1.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1442872 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Adrien Grand 2013-02-06 09:08:14 +00:00
parent eedb7ccc04
commit 5b48346ed7
2 changed files with 5 additions and 2 deletions

View File

@ -74,6 +74,9 @@ New Features
Bug Fixes
----------------------
* SOLR-2850: Do not refine facets when minCount == 1
(Matt Smith, lundgren via Adrien Grand)
* SOLR-4309: /browse: Improve JQuery autosuggest behavior (janhoy)
* SOLR-4330: group.sort is ignored when using group.truncate and ex/tag

View File

@ -416,10 +416,10 @@ public class FacetComponent extends SearchComponent
for (DistribFieldFacet dff : fi.facets.values()) {
// no need to check these facets for refinement
if (dff.initialLimit <= 0 && dff.initialMincount == 0) continue;
if (dff.initialLimit <= 0 && dff.initialMincount <= 1) continue;
// only other case where index-sort doesn't need refinement is if minCount==0
if (dff.minCount == 0 && dff.sort.equals(FacetParams.FACET_SORT_INDEX)) continue;
if (dff.minCount <= 1 && dff.sort.equals(FacetParams.FACET_SORT_INDEX)) continue;
@SuppressWarnings("unchecked") // generic array's are annoying
List<String>[] tmp = (List<String>[]) new List[rb.shards.length];