## org.apache.lucene.store.instantiated
Class InstantiatedIndex

    java.lang.Object
      org.apache.lucene.store.instantiated.InstantiatedIndex

All Implemented Interfaces:
  java.io.Serializable

    public class InstantiatedIndex

extends java.lang.Object
implements java.io.Serializable

Represented as a coupled graph of class instances, this all-in-memory index store implementation delivers search results up to a 100 times faster than the file-centric RAMDirectory at the cost of greater RAM consumption.

WARNING: This contrib is experimental and the APIs may change without warning.

There are no read and write locks in this store. `InstantiatedIndexReader` `InstantiatedIndexReader.isCurrent()` all the time and `InstantiatedIndexWriter` will attempt to update instances of the object graph in memory at the same time as a searcher is reading from it. Consider using InstantiatedIndex as if it was immutable.

See Also:
  Serialized Form

Constructor Summary
`InstantiatedIndex()` Creates an empty instantiated index for you to fill with data using an `InstantiatedIndexWriter`.
`InstantiatedIndex(org.apache.lucene.index.IndexReader sourceIndexReader)` Creates a new instantiated index that looks just like the index in a specific state as represented by a reader.
`InstantiatedIndex(org.apache.lucene.index.IndexReader sourceIndexReader, java.util.Set<java.lang.String> fields)` Creates a new instantiated index that looks just like the index in a specific state as represented by a reader.

Method Summary
`void` `close()`
`org.apache.lucene.util.BitVector` `getDeletedDocuments()`
`InstantiatedDocument[]` `getDocumentsByNumber()`
`java.util.Map<java.lang.String,byte[]>` `getNormsByFieldNameAndDocumentNumber()`
`InstantiatedTerm[]` `getOrderedTerms()`
`java.util.Map<java.lang.String,java.util.Map<java.lang.String,InstantiatedTerm>>` `getTermsByFieldAndText()`
`long` `getVersion()`
`InstantiatedIndexReader` `indexReaderFactory()`
`InstantiatedIndexWriter` `indexWriterFactory(org.apache.lucene.analysis.Analyzer analyzer, boolean create)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### InstantiatedIndex

    public InstantiatedIndex()

  Creates an empty instantiated index for you to fill with data using an `InstantiatedIndexWriter`.

### InstantiatedIndex

    public InstantiatedIndex(org.apache.lucene.index.IndexReader sourceIndexReader)
                      throws java.io.IOException

  Creates a new instantiated index that looks just like the index in a specific state as represented by a reader.

  Parameters:
    `sourceIndexReader` - the source index this new instantiated index will be copied from.
  Throws:
    `java.io.IOException` - if the source index is not optimized, or when accessing the source.

### InstantiatedIndex

    public InstantiatedIndex(org.apache.lucene.index.IndexReader sourceIndexReader,
                             java.util.Set<java.lang.String> fields)
                      throws java.io.IOException

  Creates a new instantiated index that looks just like the index in a specific state as represented by a reader.

  Parameters:
    `sourceIndexReader` - the source index this new instantiated index will be copied from.
    `fields` - fields to be added, or null for all
  Throws:
    `java.io.IOException` - if the source index is not optimized, or when accessing the source.

Method Detail

### indexWriterFactory

    public InstantiatedIndexWriter indexWriterFactory(org.apache.lucene.analysis.Analyzer analyzer,
                                                      boolean create)
                                               throws java.io.IOException

  Throws:
    `java.io.IOException`

### indexReaderFactory

    public InstantiatedIndexReader indexReaderFactory()
                                               throws java.io.IOException

  Throws:
    `java.io.IOException`

### close

    public void close()
               throws java.io.IOException

  Throws:
    `java.io.IOException`

### getTermsByFieldAndText

    public java.util.Map<java.lang.String,java.util.Map<java.lang.String,InstantiatedTerm>> getTermsByFieldAndText()

### getOrderedTerms

    public InstantiatedTerm[] getOrderedTerms()

### getDocumentsByNumber

    public InstantiatedDocument[] getDocumentsByNumber()

### getNormsByFieldNameAndDocumentNumber

    public java.util.Map<java.lang.String,byte[]> getNormsByFieldNameAndDocumentNumber()

### getDeletedDocuments

    public org.apache.lucene.util.BitVector getDeletedDocuments()

### getVersion

    public long getVersion()

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.