THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
- A index batch write (
IndexWriter.close()
) will result in creation of a new set of segment files. This could trigger a segment merge operation which could be resource intensive (think compaction in LSM). - A large number of segments would increase search latency.
- Lucene buffers documents in memory (
writer.setMaxBufferedDocs and writer.setRAMBufferSizeMB
). More RAM size means larger segments means less merging later. - Searchers will not set see any changes till IndexWriter is closed.
- Optimizations
- If a large amount of data is to be indexed, then it is better to build N smaller indexes and combine using
writer.addIndexesNoOptimize
- If a large amount of data is to be indexed, then it is better to build N smaller indexes and combine using
...