SOLR-596: handle facet.limit=0

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@667187 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2008-06-12 18:11:26 +00:00
parent 423731edd0
commit 7f0cc46ad7
1 changed files with 1 additions and 0 deletions

View File

@ -135,6 +135,7 @@ public class SimpleFacets {
public NamedList getTermCounts(String field) throws IOException { public NamedList getTermCounts(String field) throws IOException {
int offset = params.getFieldInt(field, FacetParams.FACET_OFFSET, 0); int offset = params.getFieldInt(field, FacetParams.FACET_OFFSET, 0);
int limit = params.getFieldInt(field, FacetParams.FACET_LIMIT, 100); int limit = params.getFieldInt(field, FacetParams.FACET_LIMIT, 100);
if (limit == 0) return new NamedList();
Integer mincount = params.getFieldInt(field, FacetParams.FACET_MINCOUNT); Integer mincount = params.getFieldInt(field, FacetParams.FACET_MINCOUNT);
if (mincount==null) { if (mincount==null) {
Boolean zeros = params.getFieldBool(field, FacetParams.FACET_ZEROS); Boolean zeros = params.getFieldBool(field, FacetParams.FACET_ZEROS);