I have been upgrading from Beta2
to CR1
and I ran into this issue. Beta2
wrote to, and read from, the index by name directly. There was no support for aliases. Now that aliases are supported, there seems to be no way to not use aliases. In an attempt to get my application using CR1
the same as it was on Beta2
, I created a custom IndexLayoutStrategy
that just always returned the index name. However, startup fails because of the check in ElasticsearchBackendImpl#createIndexNames
that doesn’t allow the write index to be the same as the read index.
I know the use of aliases is good, and I was part of the request for their support (Hibernate Search 6 Index Aliases), but there is no requirement that I am aware of in Elasticsearch that forces the use of aliases.
Is there a way to avoid the use of aliases and write to the index directly similar to what was done in Beta2? Or will I need to go through my existing indexes and add aliases for them to get my application to work again?
From a option side of things, I don’t think Hibernate Search for Elasticsearch should force a usage pattern with Elasticsearch. I think it should provide reasonable defaults but allow the developer to choose how they want Elasticsearch to be configured, written to, and queried. Having data in Elasticsearch provides much more use (e.g. analytics, data visualizations, etc.) other than just being able to perform search as part of application features. Being able to disable schema management is just one part of this.