Reputation: 4100
It is the first time I am using Lucence with Sitecore and I would like to know that when ever an item is updated/edited is the Index for that item gets updated automatically or not?
If not then what is the best way to update the Lucene Index whenever an item is updated?
Sitecore documentation about Index and Searching says that " Every time you update, create or delete an item Sitecore runs a job that updates the indexes". But I am unable to find the same opinion for Lucene.
Upvotes: 0
Views: 353
Reputation: 4118
You are looking at a wrong link. Link you provide us is 6.6 link but your question is Sitecore 7.2 tag. Starting from Sitecore 7, searching provider was changed. You need to check Sitecore 7 documentation.
In Sitecore you have few types of index updating strategies:
OnPublishEndAsynchronousStrategy (onPublishEndAsync): Triggered by the publish:end and publish:end:remote events, this strategy uses the event queue to determine updated data to index incrementally. If there are no entries in the history engine for the database with timestamps after that of the index’s last update, this strategy takes no action. By default, Sitecore 7 enables the event queue as required to use this strategy. The default configuration sets the CheckForThreshold setting of this strategy to true, causing a full index rebuild if the history table indicates more than the configured number of items updated. The default configuration for the sitecore_web_index index of the default publishing target database named web configured in the /App_Config/Include/Sitecore.ContentSearch.Lucene.Index.Web.config Web.config include file applies this strategy, which is appropriate for publishing target databases. You should not combine this strategy with the SynchronousStrategy strategyor the IntervalAsynchronousStrategy. You may use this strategy with indexes that use the SwitchOnRebuildLuceneIndex implementation, which indexes to a temporary directory to avoid impacting uses of the index during indexing.
RebuildAfterFullPublishStrategy (rebuildAfterFullPublish): This strategy performs a full rebuild of the index after a site publishing or any full publishing event. For a single index, you should not use this strategy conjunction with the SynchronousStrategy strategy, though you may combine it with others. If you use this strategy in conjunction with the OnPublishEndAsync strategy, be sure to register the RebuildAfterFullPublishStrategy before the OnPublishEndAsync strategy. Sitecore investigates the strategies in the order configured. With this order, you use the efficient strategy when possible (after small publishing operations), but not immediately after a full index rebuild.
More information about sitecore index strategies you can find here http://www.sitecore.net/learn/blogs/technical-blogs/john-west-sitecore-blog/posts/2013/04/sitecore-7-index-update-strategies.aspx
Upvotes: 2
Reputation: 27142
Lucene is default Sitecore index provider. In clean Sitecore instance it updates indexes automatically
Every time you update, create or delete an item
If you start messing with your configuration, you can brake it in multiple ways.
Upvotes: 1