zhaih commented on issue #12358: URL: https://github.com/apache/lucene/issues/12358#issuecomment-1595284895
After roughly catching up with the threads, I would like to go back to > +1 to update the Weight#count API contract or introduce a new API to better optimize counting. So we probably can have two count API, `constantCount` and `fastCount`? Then the contract can become, IS will call `constantCount` first, then if: * it returns `-2` then it means there's no possible constant time count, but a possible faster than normal count, then IS will call `fastCount` to retrieve count; * it returns `-1` then it means no faster count possible, go back to use query and do count normally? * it returns a natural number then it's the count. Does that makes sense? -- 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: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org