Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HSEARCH-2531 Make configuration-based index name override work with E…
…lasticsearchIndexManager We used to apply this override on the attribute returned by getIndexName(), which is really not a good idea: Hibernate Search works in such a way that it expects the index name returned by getIndexName() to be the exact same that was passed to the initialize() method. Because we did change the returned getIndexName(), we couldn't retrieve the index manager anymore when indexing and indexing failed consistently. Possible solutions were: * to align ElasticsearchIndexManager's behavior on that of DirectoryBasedIndexManager, making getIndexName() return the exact string that was passed to the initialize() method. * to make the index name passed to the initialize() method already account for the override. But that would be a breaking change to existing IndexManager implementations. * to make Hibernate Search ask newly created index managers for their actual name after initializing them (by calling getActualName is available or getIndexName otherwise). But that would be a breaking change to clients of SearchIntegrator.getIndexManager. I chose the first solution, which is more hackish, but safer in the current context of a candidate release.
- Loading branch information