-
Notifications
You must be signed in to change notification settings - Fork 8
Index Creation Strategy
Firstly see the information in What is an Elasticsearch Index Creation Strategy.
Once you have called your strategy you can add it to your SearchApplicationEventHandler
. Then when you ask for a new index to be created Umbraco.Elasticsearch will retrieve your index creation strategy to form the basis of the new index.
The Elasticsearch documentation goes into great depth on using an index aliasing strategy when deploying application with Elasticsearch, see their Index Aliases and Zero Downtime article. Umbraco.Elasticsearch embraces this approach and does all the heavy lifting to support this for your Umbraco application, the advantages of this are easy to see:
- you can create new a index in place without any impact on the operational searches occurring on your site
- you can switch between indices almost instanteously
- you can test the re-creation of an index before approving it for live use
Umbraco.Elasticsearch supports this by injecting an inline index creation contributor that will interceptor index creation and augment the index name with a timestamp. When you wish to activate a particular index the index name is used as an alias to the specific timestamp.