Habitat icon indicating copy to clipboard operation
Habitat copied to clipboard

Unicorn sync doesn't rebuild search indexes

Open nickwesselman opened this issue 6 years ago • 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

nickwesselman avatar Jul 05 '18 18:07 nickwesselman

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.

nickwesselman avatar Jul 06 '18 16:07 nickwesselman

@nickwesselman take a look at https://github.com/Sitecore/Sitecore.HabitatHome.Content/tree/develop/src/Project/Common/code/Utilities and https://github.com/Sitecore/Sitecore.HabitatHome.Content/blob/develop/gulpfile.js which does the Rebuild Indexes.

jeanfrancoislarente avatar Jul 06 '18 17:07 jeanfrancoislarente

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

nickwesselman avatar Jul 06 '18 18:07 nickwesselman

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

jeanfrancoislarente avatar Jul 06 '18 22:07 jeanfrancoislarente