lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruno Vieira" <brunovieir...@gmail.com>
Subject Memory Leak IndexSearcher
Date Mon, 03 Jul 2006 14:43:25 GMT
Hi everyone,

I am working on a project with around 35000 documents (8 text fields with
256 chars at most for each field) on lucene. But unfortunately this index is
updated at every moment and I need that these new items be in the results of
my search as fast as possible.

I have an IndexSearcher, then I do a search getting the last 10 results with
ordering by a name field and the memory allocated is 13mb, I close the
IndexSearcher because the lucene database was updated by and external
application and I create a new IndexSearcher, do the same search again
wanting to get the last 10 results with ordering by a name field and the
memory allocated is 15mb. At every time I do this cycle the memory increase
in 2mb, so in a moment I have a memory leak.

If the database is not updated and i do not create a new IndexSearcher i can
do searches forever without memory leak.

Why when I close an IndexSearcher (indexSearcher.close(); indexSearcher =
new IndexSearcher("/database/") ;)after some searches with ordering and open
a new one the memory is not free ?

Thanks to any suggestions.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message