mirror of https://github.com/apache/lucene.git
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
This commit is contained in:
parent
43cd1639f5
commit
4d1a16ff3c
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue