Apache Solr open-source search software
SOLR-8147: contrib/analytics FieldFacetAccumulator now throws IOException instead of SolrException
Christine Poerschke4d1a16ff3cf7
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex d58929c3e49..f760ec6ca79 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -432,6 +432,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 Fixesdiff --git a/solr/contrib/analytics/src/java/org/apache/solr/analytics/accumulator/facet/FieldFacetAccumulator.java b/solr/contrib/analytics/src/java/org/apache/solr/analytics/accumulator/facet/FieldFacetAccumulator.javaindex 4f300108f0a..e17450a6862 100644--- a/solr/contrib/analytics/src/java/org/apache/solr/analytics/accumulator/facet/FieldFacetAccumulator.java+++ b/solr/contrib/analytics/src/java/org/apache/solr/analytics/accumulator/facet/FieldFacetAccumulator.java@@ -30,8 +30,6 @@ import org.apache.solr.analytics.accumulator.ValueAccumulator;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 extends ValueAccumulator {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;