mirror of https://github.com/apache/lucene.git
SOLR-5685: fix FieldFacetAccumulator
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1563176 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
db5964de02
commit
f42caf79bd
|
@ -117,18 +117,26 @@ public class FieldFacetAccumulator extends ValueAccumulator {
|
|||
}
|
||||
} else {
|
||||
if(numField){
|
||||
long v = numValues.get(doc);
|
||||
if( v != 0 || numValuesBits.get(doc) ){
|
||||
parent.collectField(doc, name, ((NumericParser)parser).parseNum(numValues.get(doc)));
|
||||
if(numValues != null) {
|
||||
long v = numValues.get(doc);
|
||||
if( v != 0 || numValuesBits.get(doc) ){
|
||||
parent.collectField(doc, name, ((NumericParser)parser).parseNum(v));
|
||||
} else {
|
||||
parent.collectField(doc, name, FacetingAccumulator.MISSING_VALUE );
|
||||
}
|
||||
} else {
|
||||
parent.collectField(doc, name, FacetingAccumulator.MISSING_VALUE );
|
||||
}
|
||||
} else {
|
||||
sortValues.get(doc,value);
|
||||
if( BytesRef.EMPTY_BYTES == value.bytes ){
|
||||
parent.collectField(doc, name, FacetingAccumulator.MISSING_VALUE );
|
||||
if(sortValues != null) {
|
||||
sortValues.get(doc,value);
|
||||
if( BytesRef.EMPTY_BYTES == value.bytes ){
|
||||
parent.collectField(doc, name, FacetingAccumulator.MISSING_VALUE );
|
||||
} else {
|
||||
parent.collectField(doc, name, parser.parse(value) );
|
||||
}
|
||||
} else {
|
||||
parent.collectField(doc, name, parser.parse(value) );
|
||||
parent.collectField(doc, name, FacetingAccumulator.MISSING_VALUE );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue