Add minimal support for Index Aliases

Description

This feature request is stemming from the conversation started here https://discourse.hibernate.org/t/hibernate-search-6-index-aliases/3246

In order to support features like Elasticsearch ILM and other use cases, index aliases are used for document writes and reads. Sometimes the alias for document writes is different than the alias for document reads. The current implementation makes the assumption that documents will only be accessed via the actual index the document exists in. If attempting to use an alias for both document writes and reads (as in the case for ILM) results in an exception.

org.hibernate.search.util.common.SearchException: HSEARCH400007: Elasticsearch request failed: HSEARCH400531: Unknown index name encountered in Elasticsearch response: 'my-ilm-index.00002'

The minimal request here is to allow the ability to inform Hibernate search with the information it needs to know to use an alias for writes, possibly a different alias for reads, and how to map the resulting data based on some discriminator (e.g. index name) to the entity type.

Activity

Show:

Yoann Rodière December 13, 2019 at 12:37 PM

Will be fixed in 6.0.0.Beta3.

I did not add a configuration option to set a different read/write alias at the moment; will do in HSEARCH-3791.

Fixed

Details

Assignee

Reporter

Sprint

Fix versions

Priority

Created November 16, 2019 at 7:19 PM
Updated December 13, 2019 at 2:57 PM
Resolved December 13, 2019 at 12:37 PM