davsclaus commented on code in PR #27639:
URL: https://github.com/apache/camel/pull/27639#discussion_r4236604261
##########
components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneSearcher.java:
##########
@@ -52,9 +55,15 @@ public void open(File indexDirectory, Analyzer analyzer)
throws IOException {
this.analyzer = analyzer;
}
+ /**
+ * Closes the index reader. The analyzer is not closed: it belongs to the
endpoint (or the registry) and is used by
+ * the next query.
+ */
public void close() throws IOException {
Review Comment:
`LuceneSearcher` is a public class, and `close()` no longer closes the
analyzer passed to `open()`. As the PR description says, anyone using it
directly now has to close the analyzer themselves. Could you add a one-line
note under a `camel-lucene` heading in
`docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_23.adoc`?
Non-blocking.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]