Can you show us the code where you commit? And how do you kill your process? Kill -9 is...er...harsh....
Yeah, I'm wondering whether the index file size *stays* changed after you kill you process. If it keeps its growing on every run (after you kill your process multiple times), then I'd suspect that you aren't adding documents like you think you are. Perhaps different fields, different analyzers, etc. Luke should show you the largest document by ID, as well as document counts. Comparing changes in the document count and the max doc ID should tell you something... Is it possible that you are updating existing docs rather than adding new ones? Best Erick On Thu, Jan 7, 2010 at 10:41 AM, Naama Kraus <naamakr...@gmail.com> wrote: > Thanks dor the input. > > 1. While the process is running, I do see the index files growing on disk > and the time stamps changing. Should I see a change in size right after > killing the process, is that what you mean ? > 2. Yes, same directory is being used for indexing and search. > 3. Didn't try Luke, good idea. Though I wonder, the same code runs well on > Windows. > > Naama > > On Thu, Jan 7, 2010 at 3:37 PM, Erick Erickson <erickerick...@gmail.com > >wrote: > > > Several questions: > > 1> are the index files larger after you kill your process? > > Or have the timestamps changed? > > 2> are you absolutely sure that your indexer, when you > > add documents, is pointing at the same directory your > > search is pointing to? > > 3> Have you gotten a copy of Luke and examined your index > > to see if, perhaps, your documents aren't being added the > > way you think they are? > > > > Erick > > > > On Thu, Jan 7, 2010 at 7:13 AM, Naama Kraus <naamakr...@gmail.com> > wrote: > > > > > Hi, > > > > > > I am using IndexWriter#commit() methods in my program to commit > document > > > additions to the index. I do that once in a while, after a bunch of > > > documents were added. Since my indexing process is long, I want to make > > > sure > > > I don't loose too many additions in case of a crash. > > > When running on Windows, things work as expected. But when running my > > code > > > on Linux, seems like commit() has no effect. If I kill my program and > > then > > > restart it, I don't see documents that I added and then committed (they > > are > > > not returned by a search operation). > > > I am running Lucene 3.0.0 > > > > > > Can anyone help ? > > > > > > Thanks, Naama > > > > > > -- > > > "If you want your children to be intelligent, read them fairy tales. If > > you > > > want them to be more intelligent, read them more fairy tales." > > > "What really interests me is whether God had any choice in the creation > > of > > > the world." > > > (Albert Einstein) > > > > > > > > > -- > "If you want your children to be intelligent, read them fairy tales. If you > want them to be more intelligent, read them more fairy tales." > "What really interests me is whether God had any choice in the creation of > the world." > (Albert Einstein) >