Luca Cavanna created LUCENE-10390:
-------------------------------------
Summary: Improve Weight#count javadocs
Key: LUCENE-10390
URL: https://issues.apache.org/jira/browse/LUCENE-10390
Project: Lucene - Core
Issue Type: Improvement
Reporter: Luca Cavanna
I started working on LUCENE-10385 and chatting with [~jpountz] we said that
maybe the javadocs around Weight#count could be clarified around when it should
be implemented. It currently mentions that the method should only be overridden
by sub-classes that are able to compute/retrieve the count in O(1) time. The
intention is that computing the count should be fast and have a much smaller
overhead compared to collecting all matches. Possibly the requirement could be
relaxed to sub-linear time instead of strictly linear time? In fact, in
LUCENE-10385 we would use binary search to compute the count which does not
execute in linear time but rather O(log N) which though seems to be acceptable.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]