lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "叶双明" <>
Subject Re: lucene ram buffering
Date Fri, 05 Sep 2008 13:57:50 GMT
IndexWriter.setRAMBufferSizeMB() Determines the amount of RAM that may be
used for buffering added documents before they are flushed as a new Segment.
Does it related to IndexSearcher?

And IndexSearcher hasn't setRAMBufferSizeMB() method, mean we can't control
the amount of RAM that may be used for searching.

2008/9/4, Cam Bazz <>:
> hello,
> I was reading the performance optimization guides then I found :
> writer.setRAMBufferSizeMB()
> combined with: writer.setMaxBufferedDocs(IndexWriter.DISABLE_AUTO_FLUSH);
> this can be used to flush automatically so if the ram buffer size is over a
> certain limit it will flush.
> now the question: i would like to manage all flushes myself. yet, i still
> need a large ram buffer (for search performance)
> how can I set ram buffer size to a large value, yet dont use auto flush. I
> just want to flush every 32 documents added - and manage that myself.
> if the ram buffer size is high, but we have a small number of documents,
> does lucene try to write the entire contents of the ram buffer - thus
> resulting in a higher flush time?
> usually in oodbms systems, you use a larger ram buffer for search, and a
> smaller ram buffer for write optimization. the reason being is a smaller
> ram
> buffer is writable to disk faster.
> is that the case with lucene?
> Best.
> -C.B.

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