lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: how to "load" mmap directory into memory?
Date Wed, 03 Dec 2014 14:19:01 GMT
Canuaddalotofnonsenseorshallwebedirect!?!?! X
Sent from my BlackBerry® wireless device

-----Original Message-----
From: "Uwe Schindler" <>
Date: Wed, 3 Dec 2014 11:54:27 
To: <>
Subject: RE: how to "load" mmap directory into memory?


the first searches are always slower, which is not only caused by the FS cache. In general,
searchers must be warmed, so you execute a set of search queries or calculate facets initially
after opening (or reopening) an IndexReader. This will have the side effect of also warming
the disk cache. But it also initializes all required structures inside Lucene. So instead
of forcefully loading the whole index files into fs-cache, its better to use IndexReaderWarmer(,
which can be used with SearcherManager in Lucene to warm searchers.


Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen

> -----Original Message-----
> From: Li Li []
> Sent: Wednesday, December 03, 2014 3:46 AM
> To:
> Subject: how to "load" mmap directory into memory?
> I am using mmap fs directory in lucene. My index is small (about 3GB in disk)
> and I have plenty of memory available. The problem is that when the term is
> first queried, it's slow. How can I "load" all directory into memory? One
> solution is using many query to "warm" it up. But I can't query all terms and
> maybe some terms are still not in memory. Any other methods?
> If I write a script(or java program) to read the index file, will it load all into
> memory if I have enough memory?
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message