Sitecore/Habitat

Unicorn sync doesn't rebuild search indexes

Opened this issue · 4 comments

The Unicorn Sync operation is supposed to rebuild search indexes. However a manual rebuild seems to be necessary in order for the Habitat site search to work.

https://github.com/SitecoreUnicorn/Unicorn/blob/master/src/Unicorn/Standard%20Config%20Files/Unicorn.config#L122

This appears to be due to the fact that Unicorn does an incremental index update, which does not update the Solr schema:

Solr Error : ["undefined field newstitle"]

We likely need to introduce a full index rebuild to the build process. Perhaps a utility page / custom code that we push to the instance, execute and then remove? Or introduce SPE to Habitat. :-D

For now, I think the need to rebuild should just be documented.

@jeanfrancoislarente nice, thanks! given that you have SXA and SPE in Habitat.Home, did you consider using SPE Remoting?

That's definitely deep in our backlog. I also want to do SXA Hostname (content) changes during deployment as well so SPE Remoting would be good for that as well...