Cannot override index names through configuration properties with Elasticsearch

Description

the problem comes out while I'm trying to use Sharing Indexes feature to rename the each index; i set the breakpoint at ElasticsearchIndexManager line 141 and IndexManagerHolder line 92 finding out that two names are different which causes WorkQueuePerIndexSplitter line 31 indexManagerHolder.getBackendQueueProcessor( indexName ) to be Null , but i'm not sure whether or not it's an issue.
<property name="hibernate.search.com.xxx.xxx.xxx.Company.indexName" value="DefaultCompany"/>

Environment

ORM 5.0.2.Final

Activity

Show:
Yoann Rodière
December 22, 2016, 8:56 AM
Edited

Thank you very much for reporting this bug. I managed to reproduce it and I'm currently trying to solve it.
In the meantime, if you use annotation mapping, you should be able to override the index name with @Indexed(index = "DefaultCompany").

EDIT: fix an error in my code snippet. It's Indexed.index, not Indexed.name.

Cary.yu
December 22, 2016, 11:13 AM

Actually the annotation way currently isn't suitable for what I need, because of that I am using Spring Configuration YAML to manage multiple environments, so I need to override the index name by different one.

Yoann Rodière
December 23, 2016, 11:23 AM
Edited

Ok. The only other alternative I can see for now is programmatic mapping, which theoretically could fit your use case, but it seems a bit too much just to override an index name.

Anyway, fear not: we have a fix and it will definitely make it into 5.6.0.Final. The fix is currently undergoing review.

Cary.yu
December 23, 2016, 11:37 AM

Okay, I've seen your code on github, I think I've got an idea to solve it, thx.

Assignee

Yoann Rodière

Reporter

Cary.yu

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Components

Fix versions

Affects versions

Priority

Major
Configure