Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-User

Loading less terms in memory

 

 

Lucene java-user RSS feed   Index | Next | Previous | View Threaded


emailgane at yahoo

Nov 5, 2009, 2:46 AM

Post #1 of 2 (389 views)
Permalink
Loading less terms in memory

Hello all,

Due to some constraint in memory, I want to load less terms in memory. In case of Lucene 2.4.1, IndexDivisor is not working when we do reopen. Is there any other way out to achieve it.

Regards
Ganesh

Send instant messages to your online friends http://in.messenger.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
For additional commands, e-mail: java-user-help [at] lucene


lucene at mikemccandless

Nov 6, 2009, 1:36 AM

Post #2 of 2 (357 views)
Permalink
Re: Loading less terms in memory [In reply to]

2.9 has fixed this bug (IndexReader.reopen failing to carry over the
index divisor to newly opened segments).

One workaround is to simply use reopen(), knowing that for the new
segments it's loading all your terms, but realizing that the new
segments are usually very small so the added memory usage is minor?
The problem is, on a large merge the new segments are not small.

Alternatively, if you can sneak code into the oal.index package, you
could call MultiSegmentReader.getSubReaders() and set the index
divisor yourself? Any segment that's already loaded it terms index
will throw an IllegalStateException, which you can catch and suppress,
while the new segments will allow the call.

Mike

On Thu, Nov 5, 2009 at 5:46 AM, Ganesh <emailgane [at] yahoo> wrote:
> Hello all,
>
> Due to some constraint in memory, I want to load less terms in memory. In case of Lucene 2.4.1, IndexDivisor is not working when we do reopen. Is there any other way out to achieve it.
>
> Regards
> Ganesh
>
> Send instant messages to your online friends http://in.messenger.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
> For additional commands, e-mail: java-user-help [at] lucene
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
For additional commands, e-mail: java-user-help [at] lucene

Lucene java-user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.