Forgot to do a reply all, so just forward the messages again. ---------- Forwarded message --------- From: Huaxiang Sun <huaxiang...@gmail.com> Date: Mon, Feb 11, 2019 at 10:58 PM Subject: Re: Some questions about index hard commit and intellij dev setup To: Erick Erickson <erickerick...@gmail.com>
Thanks Erick. I will try as you suggested. For the segments part, I found that when a new commit or merge happens, the segments file is created with a new generation number. Say the old segments file is segments_8, the new one will be segments_9. Just want to get some quick confirmation from you. Thanks again! Huaxiang On Tue, Feb 12, 2019 at 8:09 AM Erick Erickson <erickerick...@gmail.com> wrote: > Yep, the segments file gets a new version number. Think of it this > way: Lucene takes great pains to keep the index from being messed up. > If the segments file were overwritten, then there'd be a chance (tiny, > but there) that the file write would fail. So by writing a new > segments_n file, Lucene can insure that that operation completed > successfully. Only after > > 1> all segments have been closed > > 2> a new segments_n file has been written. > > can Lucene be sure that all the write operations have been successful, > do any integrity checks and the like and remove any old files. At any > point prior to <2>, if anything goes wrong at least the index before > the commit will still be there and accessible and consistent. > > Oh, I didn't notice that you'd sent the last couple of e-mails > directly to me. Please only reply to the user's list in future, that > way everyone else gets to see the answers. No big deal. > > Best, > Erick > > On Mon, Feb 11, 2019 at 11:11 PM Huaxiang Sun <huaxiang...@gmail.com> > wrote: > > > > "ant clean-idea idea" did the trick, it worked for me, really appreciate > your help. I checked the wiki page for idea again, ant clean-idea is > mentioned there, not sure if I did the same cleanup before. >