Branch: refs/heads/master
Home:
https://github.com/hibernate/hibernate-search
Commit: e3c173c33d93461d5437d90dbe47ecfe2ae3d22d
https://github.com/hibernate/hibernate-search/commit/e3c173c33d93461d5437...
Author: Yoann Rodière <yoann(a)hibernate.org>
Date: 2017-01-17 (Tue, 17 Jan 2017)
Changed paths:
M
elasticsearch/src/main/java/org/hibernate/search/elasticsearch/impl/ElasticsearchIndexManager.java
Log Message:
-----------
HSEARCH-2531 Make configuration-based index name override work with
ElasticsearchIndexManager
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.
Commit: 1c885127934048c51b3dcdb891a5cfec7588b91a
https://github.com/hibernate/hibernate-search/commit/1c885127934048c51b3d...
Author: Yoann Rodière <yoann(a)hibernate.org>
Date: 2017-01-17 (Tue, 17 Jan 2017)
Changed paths:
A
engine/src/test/java/org/hibernate/search/test/configuration/IndexNameOverrideTest.java
Log Message:
-----------
HSEARCH-2531 Test the behavior of index managers regarding index name overrides
Compare:
https://github.com/hibernate/hibernate-search/compare/5ee40728c306...1c88...