We're updating the issue view to help you get more done. 

Wrong analyzers used in IndexWriter

Description

when an IndexWriter is first opened during a transaction commit it is assigned the analyzer connected to the first entity written,
if during the same transaction other entities are saved to the same index it will reuse the first one ( instead of the entity specified one).
I have a testcase showing the problem ready for commit but need your opinion about how to solve it.

I think the problem is that we register a ScopedAnalyzer for each DocumentBuilder, but there should be one per DirectoryProvider?
In this case we should check at startup that no entities sharing an index define conflicting Analyzer rules.

Another solution would be to let complete flexibility during analyzer definition, but reopen the IndexWriter when the entityType is different
from the last one indexed.

Environment

None

Status

Assignee

Sanne Grinovero

Reporter

Sanne Grinovero

Labels

None

Suitable for new contributors

None

Pull Request

None

Feedback Requested

None

Components

Fix versions

Affects versions

3.1.0.Beta1

Priority

Critical