SOLR-8312: add numBuckets and domainSize to facet telemetry

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1724341 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2016-01-13 00:50:57 +00:00
parent c3f7730717
commit 435162104d
5 changed files with 12 additions and 0 deletions

View File

@ -310,6 +310,10 @@ New Features
</BooleanQuery>
(Erik Hatcher, Karl Wettin, Daniel Collins, Nathan Visagan, Ahmet Arslan, Christine Poerschke)
* SOLR-8312: Add domain size and numBuckets to facet telemetry info (facet debug info
for the new Facet Module). (Michael Sun, yonik)
Bug Fixes
----------------------

View File

@ -643,6 +643,9 @@ abstract class FacetFieldProcessorFCBase extends FacetFieldProcessor {
}
}
FacetDebugInfo fdebug = fcontext.getDebugInfo();
if (fdebug != null) fdebug.putInfoItem("numBuckets", new Long(numBuckets));
// if we are deep paging, we don't have to order the highest "offset" counts.
int collectCount = Math.max(0, queue.size() - off);
assert collectCount <= lim;

View File

@ -393,6 +393,9 @@ class FacetFieldProcessorNumeric extends FacetFieldProcessor {
}
}
FacetDebugInfo fdebug = fcontext.getDebugInfo();
if (fdebug != null) fdebug.putInfoItem("numBuckets", new Long(numBuckets));
if (freq.allBuckets) {
SimpleOrderedMap<Object> allBuckets = new SimpleOrderedMap<>();
// countAcc.setValues(allBuckets, allBucketsSlot);

View File

@ -92,6 +92,7 @@ public class FacetModule extends SearchComponent {
fproc.process();
long timeElapsed = (long) timer.getTime();
fdebug.setElapse(timeElapsed);
fdebug.putInfoItem("domainSize", (long)fcontext.base.size());
rb.req.getContext().put("FacetDebugInfo", fdebug);
} else {
fproc.process();

View File

@ -233,6 +233,7 @@ public class FacetProcessor<FacetRequestT extends FacetRequest> {
subProcessor.process();
long timeElapsed = (long) timer.getTime();
fdebug.setElapse(timeElapsed);
fdebug.putInfoItem("domainSize", (long)subContext.base.size());
} else {
subProcessor.process();
}