Sitecore Lucene Index Update Strategy: syncMaster -


i using syncmaster lucence index strategy (because want real time data)

<strategies hint="list:addstrategy">     <strategy ref="contentsearch/indexupdatestrategies/syncmaster" /> </strategies> 

i using luke - lucene index toolbox view index documents.the question want ask is, when rebuild index my_country_index. , know there 6 country items in sitecore rebuild index. luke see 6 documents.

for 1 of above item id '{dea26cda-9ea9-4f67-bb3f-13caf6a68061}' every update item see additional document added (i see like). in index have item old , new data. correct behavior syncmaster strategy.

yes normal behaviour in sitecore if index related master database. on web database have 1 version every language of item.

you can implement custom crawler overrides custom behaviour:

public class customindexcrawler : databasecrawler {    protected override void indexversion(item item, item latestversion, sitecore.search.indexupdatecontext context)    {     if (item.versions.count > 0 && item.version.number != latestversion.version.number)         return;      base.indexversion(item, latestversion, context);     } } 

this force on indexing have last version of item. need assign custom crawler class

other option when query results latest version. need check if _latestversion equals 1.


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -