For a complete in-memory index, use Linux "tmpfs" as in-memory filesystem, and 
open the directory of this tmpfs with MMapDirectory.

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: u...@thetaphi.de


> -----Original Message-----
> From: Michael McCandless [mailto:luc...@mikemccandless.com]
> Sent: Saturday, July 27, 2013 12:44 PM
> To: Lucene Users
> Subject: Re: Directly use inverted index
> 
> You can create your own Codec and implement your own formats, e.g.
> PostingsFormat controls how postings are encoded on disk.
> 
> It's best to let the OS load the index into RAM ... as long as you have enough
> free RAM, the OS will use it to cache all hot pages from the index.
> 
> We do have a RAMDirectory but this is really best for tiny indices for testing
> purposes: it's very GC heavy for large indices because it always uses 1 KB
> byte[] to hold the files.
> 
> Mike McCandless
> 
> http://blog.mikemccandless.com
> 
> 
> On Sat, Jul 27, 2013 at 4:04 AM, Airway Wong <airwayw...@gmail.com>
> wrote:
> > Hi,
> >
> > I would like to use Lucene's inverted index directly as building block
> > for experimental purpose.
> >
> > 1. How can I customize the inverted list for different format? Is
> > there any example?
> >
> > 2. Is there an easy way to force load the complete index into memory?
> >
> > Thanks in advance.
> 
> ---------------------------------------------------------------------
> 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

Reply via email to