You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Oscar Picasso <os...@yahoo.com> on 2005/01/22 20:03:54 UTC
Lucene in Action: Batch indexing by using RAMDirectory
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've taken a look at Runtime.totalMemory() and so on but I didn't figure out
how to use these functions to prevent an OutMemoryException while using
RAMDirectory that way.
Any idea?
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org
Re: Lucene in Action: Batch indexing by using RAMDirectory
Posted by markharw00d <ma...@yahoo.co.uk>.
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 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've taken a look at Runtime.totalMemory() and so on but I didn't figure out
>how to use these functions to prevent an OutMemoryException while using
>RAMDirectory that way.
>
>Any idea?
>
>
>
>__________________________________
>Do you Yahoo!?
>Read only the mail you want - Yahoo! Mail SpamGuard.
>http://promotions.yahoo.com/new_mail
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org