SOLR-12880: Show the FacetProcessor class name instead of the

FacetRequest in the JSON Facets debug-trace output
This commit is contained in:
Tim Underwood 2018-11-08 23:32:26 -05:00 committed by David Smiley
parent 780305cf44
commit fbb987282e
3 changed files with 61 additions and 51 deletions

View File

@ -296,6 +296,9 @@ Improvements
* SOLR-12964: Json Facets: use DocValuesIterator advanceExact() instead of advance() in FacetFieldProcessorByHashDV and
UniqueSinglevaluedSlotAcc. (Tim Underwood)
* SOLR-12880: Json Facets: Show the FacetProcessor class name instead of the FacetRequest in the JSON Facets debug-trace
output (Tim Underwood)
================== 7.5.0 ==================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.

View File

@ -208,7 +208,15 @@ public class FacetHeatmap extends FacetRequest {
@Override
public FacetProcessor createFacetProcessor(FacetContext fcontext) {
return new FacetProcessor(fcontext, this) {
return new FacetHeatmapProcessor(fcontext);
}
// don't use an anonymous class since the getSimpleName() isn't friendly in debug output
private class FacetHeatmapProcessor extends FacetProcessor {
public FacetHeatmapProcessor(FacetContext fcontext) {
super(fcontext, FacetHeatmap.this);
}
@Override
public void process() throws IOException {
super.process(); // handles domain changes
@ -263,7 +271,6 @@ public class FacetHeatmap extends FacetRequest {
}
}
};
}
private static Object formatCountsVal(String format, int columns, int rows, int[] counts, FacetDebugInfo debugInfo) {

View File

@ -371,7 +371,7 @@ public abstract class FacetRequest {
debugInfo.setFilter(fcontext.filter.toString());
}
debugInfo.setReqDescription(getFacetDescription());
debugInfo.setProcessor(getClass().getSimpleName());
debugInfo.setProcessor(facetProcessor.getClass().getSimpleName());
debugInfo.putInfoItem("domainSize", (long) fcontext.base.size());
RTimer timer = new RTimer();
facetProcessor.process();