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. |