You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "javasoze (via GitHub)" <gi...@apache.org> on 2025/12/05 13:13:14 UTC

[I] Introduce annotation to indicate when a DocIdStream implementation can be replayed [lucene]

javasoze opened a new issue, #15477:
URL: https://github.com/apache/lucene/issues/15477

   ### Description
   
   Sometimes a DocIdStream can be replayed, e.g. `RangeDocIdStream`, there is not iterator state kept with the instance.
   
   Proposal:
   
   Introduce an annotation
   
   ```java
   @Retention(RetentionPolicy.RUNTIME)
   public @interface Replayable {
   }
   ```
   
   To indicate a DocIdStream can be replayed.
   


-- 
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.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


Re: [I] Introduce annotation to indicate when a DocIdStream implementation can be replayed [lucene]

Posted by "javasoze (via GitHub)" <gi...@apache.org>.
javasoze commented on issue #15477:
URL: https://github.com/apache/lucene/issues/15477#issuecomment-3618137046

   Yup, empty marker interface does exactly the samething, annotation is just prettier and allows for future parameters support. But in this context, no difference.
   
   DocIdStreams are like iterators, it can be only scanned through once. But nothing in the api that prohibits it to be reused.
   
   If we were to pass the same DocIdStream to multiple aggregators, without knowing it can be replayed, it needs to be reconstructed.


-- 
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


Re: [I] Introduce annotation to indicate when a DocIdStream implementation can be replayed [lucene]

Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss commented on issue #15477:
URL: https://github.com/apache/lucene/issues/15477#issuecomment-3618012772

   Wouldn't an empty marker interface be easier to work with? Anyway, such changes should probably be motivated by something else, otherwise they lack the necessary context for saying if it's right or wrong.


-- 
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