Read alias pointing to multiple indexes


Is there a possibility to set read alias for multiple indexes? I would like to create a new index every month.

When I tried that with IndexLayoutStrategy and adding aliases in ES I got this error:

HSEARCH400593: Invalid Elasticsearch index layout: index names [index-write, index-read] resolve to multiple distinct indexes [index-202401-000001, index-202402-000001]. These names must resolve to a single index.

Thank you.

Kind Regards,



This is not supported at the moment, so the only way you could make it work is by disabling Hibernate Search’s schema management completely – see Hibernate Search 7.1.1.Final: Reference Documentation . Whether indexing/search will work in practice remains to be seen.

If you want this to be implemented/tested in Hibernate Search, you will need to submit a feature request on Jira explaining:

  1. How Hibernate Search should behave when dropping/validating/updating the indexes (which indexes to target?)
  2. How Hibernate Search should behave when flushing/refreshing/merging (which indexes to target?)
  3. How Hibernate Search should behave when updating/deleting entities (what can we do if the entities are not in the write index but in an older index?)
  4. Any other relevant behavior.

Also, to actually get it implemented once we all agree on the details of the feature, sending a pull request yourself would help a lot :wink: