NRT performance: avoid refreshing an IndexReader aggressively

Description

Every transactional write is currently triggering an immediate refresh of the IndexReader. These IndexReaders are not as cheap as they used to be in previous Lucene version and it's possible that they are not even used for queries in write-intensive scenarios.

We can just flag the need for a fresh IndexReader and make sure that a new generation is refreshed on demand.

Environment

None
Fixed

Assignee

Sanne Grinovero

Reporter

Sanne Grinovero

Labels

None

Suitable for new contributors

None

Pull Request

None

Feedback Requested

None

Components

Fix versions

Priority

Major
Configure