Trigger GatherNodeData in load balanced environment
Hi,
I have a scenario where I need to trigger GatherNodeData (ReIndexNode) for a currently published node's children, since the child nodes read some properties from their parent and those properties need to be saved in the lucene-index.
This only works on a singled machine:
examineManager.IndexProviderCollection["CustomIndex"].ReIndexNode(...)
Should I use content.Instance.UpdateDocumentCache(id) or is there a better way to do it?
Are you calling the ReIndex method from a ContentService published event ?
In a loadbalanced environment you need to hook in to PageCacheRefresher.Updated event. This will fire on all loadbalanced instances, where the published event will only fire on the server that is doing the publishing.
I did call the ReIndexNode from ContentService Published event. Can't believe I didn't think of moving the Reindex-triggering to PageCacheRefresher.UpdateCache.
Trigger GatherNodeData in load balanced environment
Hi,
I have a scenario where I need to trigger
GatherNodeData
(ReIndexNode) for a currently published node's children, since the child nodes read some properties from their parent and those properties need to be saved in the lucene-index.This only works on a singled machine:
examineManager.IndexProviderCollection["CustomIndex"].ReIndexNode(...)
Should I use
content.Instance.UpdateDocumentCache(id)
or is there a better way to do it?Running
Umbraco 7.4.3
Regards,
Martin
Hi Martin,
Are you calling the ReIndex method from a ContentService published event ?
In a loadbalanced environment you need to hook in to PageCacheRefresher.Updated event. This will fire on all loadbalanced instances, where the published event will only fire on the server that is doing the publishing.
Dave
Hi Dave,
I did call the ReIndexNode from ContentService Published event. Can't believe I didn't think of moving the Reindex-triggering to PageCacheRefresher.UpdateCache.
Thank you so much! This works perfectly.
Regards
Martin
is working on a reply...