You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by cp...@apache.org on 2015/11/05 15:26:35 UTC

svn commit: r1712783 - in /lucene/dev/branches/branch_5x: ./ solr/ solr/CHANGES.txt solr/contrib/ solr/contrib/analytics/src/java/org/apache/solr/analytics/accumulator/facet/FieldFacetAccumulator.java

Author: cpoerschke
Date: Thu Nov  5 14:26:34 2015
New Revision: 1712783

URL: http://svn.apache.org/viewvc?rev=1712783&view=rev
Log:
SOLR-8147: contrib/analytics FieldFacetAccumulator now throws IOException instead of SolrException (merge in revision 1712751 from trunk)

Modified:
    lucene/dev/branches/branch_5x/   (props changed)
    lucene/dev/branches/branch_5x/solr/   (props changed)
    lucene/dev/branches/branch_5x/solr/CHANGES.txt   (contents, props changed)
    lucene/dev/branches/branch_5x/solr/contrib/   (props changed)
    lucene/dev/branches/branch_5x/solr/contrib/analytics/src/java/org/apache/solr/analytics/accumulator/facet/FieldFacetAccumulator.java

Modified: lucene/dev/branches/branch_5x/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/CHANGES.txt?rev=1712783&r1=1712782&r2=1712783&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/CHANGES.txt (original)
+++ lucene/dev/branches/branch_5x/solr/CHANGES.txt Thu Nov  5 14:26:34 2015
@@ -322,6 +322,9 @@ Other Changes
 * SOLR-8218: DistributedUpdateProcessor (initialCapacity) tweaks
   (Christine Poerschke)
 
+* SOLR-8147: contrib/analytics FieldFacetAccumulator now throws IOException instead of SolrException
+  (Scott Stults via Christine Poerschke)
+
 ==================  5.3.1 ==================
 
 Bug Fixes

Modified: lucene/dev/branches/branch_5x/solr/contrib/analytics/src/java/org/apache/solr/analytics/accumulator/facet/FieldFacetAccumulator.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/contrib/analytics/src/java/org/apache/solr/analytics/accumulator/facet/FieldFacetAccumulator.java?rev=1712783&r1=1712782&r2=1712783&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/contrib/analytics/src/java/org/apache/solr/analytics/accumulator/facet/FieldFacetAccumulator.java (original)
+++ lucene/dev/branches/branch_5x/solr/contrib/analytics/src/java/org/apache/solr/analytics/accumulator/facet/FieldFacetAccumulator.java Thu Nov  5 14:26:34 2015
@@ -30,8 +30,6 @@ import org.apache.solr.analytics.accumul
 import org.apache.solr.analytics.util.AnalyticsParsers;
 import org.apache.solr.analytics.util.AnalyticsParsers.NumericParser;
 import org.apache.solr.analytics.util.AnalyticsParsers.Parser;
-import org.apache.solr.common.SolrException;
-import org.apache.solr.common.SolrException.ErrorCode;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.schema.DateValueFieldType;
 import org.apache.solr.schema.SchemaField;
@@ -57,14 +55,11 @@ public class FieldFacetAccumulator exten
   
   public FieldFacetAccumulator(SolrIndexSearcher searcher, FacetValueAccumulator parent, SchemaField schemaField) throws IOException {  
     if( !schemaField.hasDocValues() ){
-      throw new SolrException(ErrorCode.BAD_REQUEST, "Field '"+schemaField.getName()+"' does not have docValues");
+      throw new IOException("Field '"+schemaField.getName()+"' does not have docValues and therefore cannot be faceted over.");
     }
     this.searcher = searcher;
     this.schemaField = schemaField;
     this.name = schemaField.getName();
-    if (!schemaField.hasDocValues()) {
-      throw new IOException(name+" does not have docValues and therefore cannot be faceted over.");
-    }
     this.multiValued = schemaField.multiValued();
     this.numField = schemaField.getType().getNumericType()!=null;
     this.dateField = schemaField.getType() instanceof DateValueFieldType;