You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "zhaih (via GitHub)" <gi...@apache.org> on 2023/06/16 20:37:56 UTC

[GitHub] [lucene] zhaih commented on issue #12358: Optimize `count()` for BooleanQuery disjunction

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-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org