From 4d1a16ff3cf7b185c7e2f79b9d5b007bfb49ebce Mon Sep 17 00:00:00 2001 From: Christine Poerschke Date: Thu, 5 Nov 2015 12:13:34 +0000 Subject: [PATCH] SOLR-8147: contrib/analytics FieldFacetAccumulator now throws IOException instead of SolrException git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1712751 13f79535-47bb-0310-9956-ffa450edef68 --- solr/CHANGES.txt | 3 +++ .../analytics/accumulator/facet/FieldFacetAccumulator.java | 7 +------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 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 Fixes diff --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.java index 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;