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