lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Wettin (JIRA)" <>
Subject [jira] Updated: (LUCENE-550) InstantiatedIndex - faster but memory consuming index
Date Sat, 03 Feb 2007 18:17:06 GMT


Karl Wettin updated LUCENE-550:

    Attachment: trunk.diff.bz2

Added support for contrib/memory MemoryIndex, so now it works with readers and writers as
if it was any other index.

Added a consumer level index implementation that handles cache, notifications, and all the
stuff this issue is about:

// This is the instace one is supposed to use for all access against the index in this JVM.
IndexFacade index = new IndexFacade(new RAMDirectoryIndex());

// Accessors
IndexWriterInterface writer = index.indexWriterFactory(anayzler, true);
Document doc = new Document();
IndexReader deleter = index.indexReaderFactory();
assertEquals(0, index.getReader().numDocs());

public class IndexFacade {

  /** wrapps any storage, optional cache settings */
  public IndexFacade(I index, CachedSearcher.HitCollectionCacheState hitCollectionCache, boolean
topDocsCache, boolean topFieldsCache, boolean documentsCache) throws IOException {
  public CachedSearcher getSearcher() throws IOException {

  /** The general consumer searcher to be used when querying this index. Always fresh. */
  public Searcher getSearcher() throws IOException {

  /** The general consumer read only index reader to be used when inspecting this index. Always
fresh. */
  public IndexReader getReader() throws IOException {

> InstantiatedIndex - faster but memory consuming index
> -----------------------------------------------------
>                 Key: LUCENE-550
>                 URL:
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: Store
>    Affects Versions: 2.0.0
>            Reporter: Karl Wettin
>         Assigned To: Karl Wettin
>         Attachments: lucene-550.jpg,, trunk.diff.bz2, trunk.diff.bz2
> An non file centrinc all in memory index. Consumes some 2x the memory of a RAMDirectory
(in a term satured index) but is between 3x-60x faster depending on application and how one
counts. Average query is about 8x faster. IndexWriter and IndexModifier have been realized
in InterfaceIndexWriter and InterfaceIndexModifier. 
> InstantiatedIndex is wrapped in a new top layer index facade (class Index) that comes
with factory methods for writers, readers and searchers for unison index handeling. There
are decorators with notification handling that can be used for automatically syncronizing
searchers on updates, et.c. 
> Index also comes with FS/RAMDirectory implementation.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

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

View raw message