Apache Lucene open-source search software
SOLR-7452: add CHANGES for refinement, remove debugging output, don't indent _facet_ refinement info
yonik3b5f3cc3edfa
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex 8db87529101..ec80aece376 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -136,6 +136,13 @@ New Features* SOLR-10677: Expose a diagnostics API to return nodes sorted by load in descending order andany policy violations. (shalin)+* SOLR-7452: Refinement for JSON Facet API: Adding refine:true to any terms facet will cause an+ additional distributed search phase (overlapped with field retrieval) that requests additional info+ for top facet buckets from shards that did not previously contribute to that bucket.+ This will correct counts (and other statistics) for those top buckets collected in the first+ phase. (yonik)++Bug Fixes----------------------* SOLR-9262: Connection and read timeouts are being ignored by UpdateShardHandler after SOLR-4509.diff --git a/solr/core/src/java/org/apache/solr/search/facet/FacetModule.java b/solr/core/src/java/org/apache/solr/search/facet/FacetModule.javaindex 3407ae41c1b..7fc016bc4b8 100644--- a/solr/core/src/java/org/apache/solr/search/facet/FacetModule.java+++ b/solr/core/src/java/org/apache/solr/search/facet/FacetModule.java@@ -234,7 +234,7 @@ public class FacetModule extends SearchComponent {Map<String,Object> finfo = new HashMap<>(1);finfo.put(FACET_REFINE, refinement);- String finfoStr = JSONUtil.toJSON(finfo);+ String finfoStr = JSONUtil.toJSON(finfo, -1);// System.err.println("##################### REFINE=" + finfoStr);shardsRefineRequest.params.add(FACET_INFO, finfoStr);@@ -281,10 +281,8 @@ public class FacetModule extends SearchComponent {}if ((sreq.purpose & PURPOSE_REFINE_JSON_FACETS) != 0) {- System.err.println("REFINE FACET RESULT FROM SHARD = " + facet);+ // System.err.println("REFINE FACET RESULT FROM SHARD = " + facet);// call merge again with a diff flag set on the context???-// throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "WORK IN PROGRESS, MERGING FACET REFINEMENT NOT SUPPORTED YET!");-facetState.mcontext.root = facet;facetState.mcontext.setShard(shardRsp.getShard()); // TODO: roll newShard into setShard?facetState.merger.merge(facet , facetState.mcontext);