Canuaddalotofnonsenseorshallwebedirect!?!?! X Sent from my BlackBerry® wireless device
-----Original Message----- From: "Uwe Schindler" <u...@thetaphi.de> Date: Wed, 3 Dec 2014 11:54:27 To: <java-user@lucene.apache.org> Reply-To: java-user@lucene.apache.org Subject: RE: how to "load" mmap directory into memory? Hi, 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(http://lucene.apache.org/core/4_10_2/core/org/apache/lucene/index/IndexWriter.IndexReaderWarmer.html), which can be used with SearcherManager in Lucene to warm searchers. Uwe ----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -----Original Message----- > From: Li Li [mailto:fancye...@gmail.com] > Sent: Wednesday, December 03, 2014 3:46 AM > To: java-user@lucene.apache.org > 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: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org