Yuti-G commented on code in PR #974:
URL: https://github.com/apache/lucene/pull/974#discussion_r915448876
##########
lucene/demo/src/java/org/apache/lucene/demo/facet/DistanceFacetsExample.java:
##########
@@ -212,7 +212,26 @@ public static Query getBoundingBoxQuery(
}
/** User runs a query and counts facets. */
- public FacetResult search() throws IOException {
+ public FacetResult searchAllChildren() throws IOException {
+
+ FacetsCollector fc = searcher.search(new MatchAllDocsQuery(), new
FacetsCollectorManager());
+
+ Facets facets =
+ new DoubleRangeFacetCounts(
+ "field",
+ getDistanceValueSource(),
+ fc,
+ getBoundingBoxQuery(ORIGIN_LATITUDE, ORIGIN_LONGITUDE, 10.0),
+ ONE_KM,
+ TWO_KM,
+ FIVE_KM,
+ TEN_KM);
+
+ return facets.getAllChildren("field");
+ }
+
+ /** User runs a query and counts facets. */
+ public FacetResult searchTopChildren() throws IOException {
Review Comment:
Sorry for the confusion. I've renamed the variables and addressed the
comments in the latest commit. Please do let me know if there is anything that
still look confusing. Thanks again for all the great suggestions!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]