We have recently been doing a number of Sitecore upgrades. In one of them, we have upgraded the system from Sitecore 6.5 to 7.2. After the upgrade, newly published News items didn’t appear on their news page. This used search, and upon examination of the Lucene indexes, the new items didn’t exist in the index. Continue reading “Newly Published Sitecore Item doesn’t appear in Search”
Indexes
For Multiple Publishing Targets, Update IndexUpdateStrategies
Hat off to Kam Figy for his phenomenally useful post – “Have two web databases? Don’t forget the IndexUpdateStrategy“. The clue is in in the title – if you’ve got multiple publishing targets – so multiple web databases – you’ll need to specify a new (differently named) OnPublishEndAsync strategy (e.g. OnDeliveryPublishEndAsync). The standard one only applies to the Web database. Then reference that strategy.
Go read his post; it’s a good one.
Check your app pool recycling before rebuilding indexes
So, I have been working on the upgrade of a very large Sitecore instance. As part of the upgrade, you have to rebuild the search indexes. This is a very time consuming process, so I was starting it at the end of the working day – but it kept failing. Continue reading “Check your app pool recycling before rebuilding indexes”
Sitecore – Switching Indexes on Rebuild
The project I’m working on makes fairly extensive use of Sitecore’s search functionality, and I realised that one problem I could foresee was that of Index updates. When rebuilding the search index, by default Sitecore deletes the existing index, and then builds a new one. While this is going on, search is not available. That’s not really acceptable… Continue reading “Sitecore – Switching Indexes on Rebuild”
Working with fields in CSOM
I’ve already detailed how to create a new Taxonomy Field in CSOM – here’s the more generic how to create a general field on a list.:
internal static void CreateFields(ClientContext clientContext, List targetList, string xmlDef) { targetList.Fields.AddFieldAsXml(xmlDef, true, AddFieldOptions.AddFieldInternalNameHint); clientContext.ExecuteQuery(); }
And as a bonus, here’s how to set a field to be indexed in the client side object model:
internal static void SetIndex(ClientContext clientContext, List list, string fieldName) { Field f = list.Fields.GetByInternalNameOrTitle(fieldName); clientContext.Load(f); clientContext.ExecuteQuery(); f.Indexed = true; f.Update(); list.Update(); clientContext.ExecuteQuery(); }