gf2121 commented on code in PR #13221:
URL: https://github.com/apache/lucene/pull/13221#discussion_r1539558105
##########
lucene/core/src/java/org/apache/lucene/index/PointValues.java:
##########
@@ -383,25 +383,18 @@ public final long estimatePointCount(IntersectVisitor
visitor) {
}
}
- /**
- * Estimate if the point count that would be matched by {@link #intersect}
with the given {@link
- * IntersectVisitor} is greater than or equal to the upperBound.
- *
- * @lucene.internal
- */
- public static boolean isEstimatedPointCountGreaterThanOrEqualTo(
- IntersectVisitor visitor, PointTree pointTree, long upperBound) throws
IOException {
- return estimatePointCount(visitor, pointTree, upperBound) >= upperBound;
- }
-
/**
* Estimate the number of documents that would be matched by {@link
#intersect} with the given
- * {@link IntersectVisitor}. The estimation will terminate when the point
count gets greater than
- * or equal to the upper bound.
+ * {@link IntersectVisitor}. The estimation will terminate when the point
count get greater than
+ * up bound. That said, if the return value is less than the upperBound, it
is the accurate
+ * estimated point value, otherwise it means the number of points in the
tree is greater than or
+ * equals to the upperBound.
*
* <p>TODO: will broad-first help estimation terminate earlier?
+ *
+ * @lucene.internal
*/
- private static long estimatePointCount(
+ public static long estimatePointCount(
Review Comment:
I have to make the public again to get accurate point count size in
[`intersectThresholdValue`](https://github.com/apache/lucene/blob/5e95d360730794bfe637e23d63b561b7f7e6ef9a/lucene/core/src/java/org/apache/lucene/search/comparators/NumericComparator.java#L245)
--
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]