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 <[EMAIL PROTECTED]>: > > 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. >