Lucene startup creates an unnecessary IndexWriter

Description

Since HSEARCH-3084, starting a Lucene index will create an unnecessary IndexWriter to handle the commit() after the call to ensureIndexExists().

Beyond the fact that creating the index writer unnecessarily will have a bad impact on read-only applications, this is also causing me trouble in tests I'm attempting to write.

Environment

None

Assignee

Yoann Rodière

Reporter

Yoann Rodière

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Components

Fix versions

Priority

Major
Configure