Hi Mark, On Sun, Mar 7, 2010 at 6:20 PM, Mark Fletcher <mark.fletcher2...@gmail.com>wrote:
> > I have created 2 identical cores coreX and coreY (both have different > dataDir values, but their index is same). > coreX - always serves the request when a user performs a search. > coreY - the updates will happen to this core and then I need to synchronize > it with coreX after the update process, so that coreX also has the > latest data in it. After coreX and coreY are synchronized, both > should again be identical again. > > For this purpose I tried core merging of coreX and coreY once coreY is > updated with the latest set of data. But I find coreX to be containing > double the record count as in coreY. > (coreX = coreX+coreY) > > Is there a problem in using MERGE concept here. If it is wrong can some one > pls suggest the best approach. I tried the various merges explained in my > previous mail. > > Index merge happens at the Lucene level which has no idea about uniqueKeys. Therefore when you merge two indexes containing exactly the same documents (by uniqueKey), you get double the document count. Looking at your scenario, it seems to me that what you want to do is a swap operation. coreX is serving the requests, coreY is updated and now you can swap coreX with coreY so that new requests hit the updated index. I suggest you look at the swap operation instead of index merge. -- Regards, Shalin Shekhar Mangar.