I posted a suggested solution to this some time ago:
http://marc.theaimsgroup.com/?l=lucene-user&m=108922279803667&w=2
The overhead of doing these tests was negligible but I haven't tried it
since TermVectors and the compound indexes were introduced.
Oscar Picasso wrote:
Hi,
On page 52 of Lucene
Hi,
On page 52 of Lucene in Action (Indexing > Controlling the indexing process >
Batch indexing by using RAMDirectory as a buffer) I read:
"A more sophisticated approach would involve keeping track of RAMDirectory's
memory consumption, in order to prevent RAMDirectory from growing too large."
I