lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "石玉明" <shiyuming....@gmail.com>
Subject Re: Urgent! Forgot to close IndexWriter after adding Documents to the index.
Date Tue, 22 Mar 2011 01:41:03 GMT
So,you'd better to start the program soon. There is annother suggestion: you can construct
the index by more than one IndexerWriter, 
as long as I know, you can use indexs to construct the index seperately, then conbine them.
It will save many time. 
I am new to Lucene, I can't remember the syntex clearly, you can return to the Docs. good
luck!


2011-03-22 



石玉明 



发件人: Kevin Tse 
发送时间: 2011-03-21  14:06:22 
收件人: java-user@lucene.apache.org 
抄送: 
主题: Urgent! Forgot to close IndexWriter after adding Documents to the index. 
 
Hi, experts

I had a program running for 2 days to build an index for around 160 million
text files, and after program ended, I tried searching the index and found
the index was not correctly built, *indexReader.numDocs()* returns 0. I
checked the index directory, it looked good, all the index data seemed to be
there, the directory is 1.5 Gigabytes in size.

I checked my code and found that I forgot to call *indexWriter.optimize()*and
*indexWriter.close()*, I want to know if it is possible to
*re-optimize()*the index so I don't need to rebuild the whole index
from scratch? I don't
really want the program to take another 2 days.

Thanks!

-- 
Neevek Est
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message