jpountz commented on code in PR #14271: URL: https://github.com/apache/lucene/pull/14271#discussion_r1965729900
########## lucene/suggest/src/java/org/apache/lucene/search/suggest/document/CompletionsTermsReader.java: ########## @@ -72,10 +72,8 @@ public final class CompletionsTermsReader implements Accountable { */ public synchronized NRTSuggester suggester() throws IOException { if (suggester == null) { - try (IndexInput dictClone = dictIn.clone()) { // let multiple fields load concurrently - dictClone.seek(offset); - suggester = NRTSuggester.load(dictClone, fstLoadMode); - } + IndexInput indexInput = dictIn.slice("NRTSuggester", offset, dictIn.length() - offset); Review Comment: This got me confused wrt the PR title since slices are technically clones. Maybe update the title to say "stop closing the clone" instead of "stop cloning"? -- 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