lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbern...@apache.org
Subject svn commit: r1535614 - /lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/CollapsingQParserPlugin.java
Date Fri, 25 Oct 2013 02:50:34 GMT
Author: jbernste
Date: Fri Oct 25 02:50:34 2013
New Revision: 1535614

URL: http://svn.apache.org/r1535614
Log:
SOLR-5027: Added error handling to CollapsingQParserPlugin

Modified:
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/CollapsingQParserPlugin.java

Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/CollapsingQParserPlugin.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/CollapsingQParserPlugin.java?rev=1535614&r1=1535613&r2=1535614&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/CollapsingQParserPlugin.java
(original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/CollapsingQParserPlugin.java
Fri Oct 25 02:50:34 2013
@@ -188,6 +188,8 @@ public class CollapsingQParserPlugin ext
         this.nullPolicy = NULL_POLICY_COLLAPSE;
       } else if(nPolicy.equals((NULL_EXPAND))) {
         this.nullPolicy = NULL_POLICY_EXPAND;
+      } else {
+        throw new IOException("Invalid nullPolicy:"+nPolicy);
       }
       this.searcher = request.getSearcher();
       this.leafCount = searcher.getTopReaderContext().leaves().size();
@@ -516,6 +518,8 @@ public class CollapsingQParserPlugin ext
         this.fieldValueCollapse =  new LongValueCollapse(searcher, field, nullPolicy, new
int[valueCount], max, this.needsScores, boostDocs);
       } else if(fieldType instanceof TrieFloatField) {
         this.fieldValueCollapse =  new FloatValueCollapse(searcher, field, nullPolicy, new
int[valueCount], max, this.needsScores, boostDocs);
+      } else {
+        throw new IOException("min/max must be either TrieInt, TrieLong or TrieFloat.");
       }
     }
 



Mime
View raw message