lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <erickerick...@gmail.com>
Subject Re: Index Rows as Documents? Help me design a solution
Date Tue, 25 Jul 2006 13:39:48 GMT
Indexing 1M of logs shouldn't take minutes, so  you're probably right.

A problem I've seen is opening/indexing/closing your index writer too often.
You should do something like... (really bad pseudo code here)

IndexWriter IW = new IndexWriter(....);
for (lots and lots and lots of records) {
   IW.addDocument();
}

IW.optimize();
IW.close();


Others have had a problem where they open/write/close the index writer for
EACH document, which is painfully slow.

Also, you might play around with IndexWriter.setMergeFactor and
setMaxBufferedDocs. If you set them too high, you'll run out of memory, but
they can make a difference in now fast your index is built....


If none of this is relevant, can you post a bit of (perhaps pseudo) code?

Best
Erick

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