You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "vsop-479 (via GitHub)" <gi...@apache.org> on 2024/08/02 06:58:54 UTC
Re: [PR] Add reopen method in PerThreadPKLookup [lucene]
vsop-479 commented on code in PR #13596:
URL: https://github.com/apache/lucene/pull/13596#discussion_r1701382048
##########
lucene/test-framework/src/java/org/apache/lucene/tests/index/PerThreadPKLookup.java:
##########
@@ -97,5 +111,82 @@ public int lookup(BytesRef id) throws IOException {
return -1;
}
- // TODO: add reopen method to carry over re-used enums...?
+ /**
+ * Reuse loaded segments' termsEnum and postingsEnum.
+ *
+ * @return null if there are no changes; else, a new DirectoryReader instance which you must
+ * eventually close.
+ * @throws IOException if there is a low-level IO error.
+ */
+ public DirectoryReader reopen() throws IOException {
Review Comment:
I modified it.
--
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