Class FlushByRamOrCountsPolicy

java.lang.Object
org.apache.lucene.index.FlushPolicy
org.apache.lucene.index.FlushByRamOrCountsPolicy

class FlushByRamOrCountsPolicy extends FlushPolicy
Default FlushPolicy implementation that flushes new segments based on RAM used and document count depending on the IndexWriter's IndexWriterConfig. It also applies pending deletes based on the number of buffered delete terms.

All IndexWriterConfig settings are used to mark DocumentsWriterPerThread as flush pending during indexing with respect to their live updates.

If IndexWriterConfig.setRAMBufferSizeMB(double) is enabled, the largest ram consuming DocumentsWriterPerThread will be marked as pending iff the global active RAM consumption is >= the configured max RAM buffer.