From 7f0cc46ad7e879221c7616035f41b291ad820b2d Mon Sep 17 00:00:00 2001 From: Yonik Seeley Date: Thu, 12 Jun 2008 18:11:26 +0000 Subject: [PATCH] SOLR-596: handle facet.limit=0 git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@667187 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/solr/request/SimpleFacets.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/java/org/apache/solr/request/SimpleFacets.java b/src/java/org/apache/solr/request/SimpleFacets.java index 31aa73b7cad..f33975a2ffc 100644 --- a/src/java/org/apache/solr/request/SimpleFacets.java +++ b/src/java/org/apache/solr/request/SimpleFacets.java @@ -135,6 +135,7 @@ public class SimpleFacets { public NamedList getTermCounts(String field) throws IOException { int offset = params.getFieldInt(field, FacetParams.FACET_OFFSET, 0); int limit = params.getFieldInt(field, FacetParams.FACET_LIMIT, 100); + if (limit == 0) return new NamedList(); Integer mincount = params.getFieldInt(field, FacetParams.FACET_MINCOUNT); if (mincount==null) { Boolean zeros = params.getFieldBool(field, FacetParams.FACET_ZEROS);