SOLR-7452: fix facet refinement for method:dvhash

This commit is contained in:
yonik 2017-06-04 20:13:25 -04:00
parent db2b19f6ba
commit 67876b3027
2 changed files with 7 additions and 2 deletions

View File

@ -98,7 +98,12 @@ public class FacetField extends FacetRequestSorted {
FieldType ft = sf.getType(); FieldType ft = sf.getType();
boolean multiToken = sf.multiValued() || ft.multiValuedFieldCache(); boolean multiToken = sf.multiValued() || ft.multiValuedFieldCache();
NumberType ntype = ft.getNumberType(); if (fcontext.facetInfo != null) {
// refinement... we will end up either skipping the entire facet, or doing calculating only specific facet buckets
return new FacetFieldProcessorByArrayDV(fcontext, this, sf);
}
NumberType ntype = ft.getNumberType();
// ensure we can support the requested options for numeric faceting: // ensure we can support the requested options for numeric faceting:
if (ntype != null) { if (ntype != null) {
if (prefix != null) { if (prefix != null) {

View File

@ -238,7 +238,7 @@ public class TestJsonFacetRefinement extends SolrTestCaseHS {
ModifiableSolrParams p = params("cat_s", "cat_s", "xy_s", "xy_s", "num_d", "num_d", "qw_s", "qw_s", "er_s","er_s"); ModifiableSolrParams p = params("cat_s", "cat_s", "xy_s", "xy_s", "num_d", "num_d", "qw_s", "qw_s", "er_s","er_s");
doBasicRefinement( p ); doBasicRefinement( p );
p.set("terms","method:dv,"); p.set("terms","method:dvhash,");
doBasicRefinement( p ); doBasicRefinement( p );
// multi-valued strings // multi-valued strings