Java org.apache.lucene.index.memory MemoryIndex fields, constructors, methods, implement or subclass

Example usage for Java org.apache.lucene.index.memory MemoryIndex fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.lucene.index.memory MemoryIndex.

The text is from its open source code.

Constructor

MemoryIndex()
Constructs an empty instance that will not store offsets or payloads.
MemoryIndex(boolean storeOffsets)
Constructs an empty instance that can optionally store the start and end character offset of each token term in the text.

Method

voidaddField(String fieldName, String text, Analyzer analyzer)
Convenience method; Tokenizes the given field text and adds the resulting terms to the index; Equivalent to adding an indexed non-keyword Lucene org.apache.lucene.document.Field that is tokenized, not stored, termVectorStored with positions (or termVectorStored with positions and offsets),
voidaddField(String fieldName, TokenStream stream, int positionIncrementGap)
Iterates over the given token stream and adds the resulting terms to the index; Equivalent to adding a tokenized, indexed, termVectorStored, unstored, Lucene org.apache.lucene.document.Field .
voidaddField(IndexableField field, Analyzer analyzer)
Adds a lucene IndexableField to the MemoryIndex using the provided analyzer.
voidaddField(String fieldName, TokenStream stream)
Iterates over the given token stream and adds the resulting terms to the index; Equivalent to adding a tokenized, indexed, termVectorStored, unstored, Lucene org.apache.lucene.document.Field .
IndexSearchercreateSearcher()
Creates and returns a searcher that can be used to execute arbitrary Lucene queries and to collect the resulting query results as hits.
MemoryIndexfromDocument(Iterable document, Analyzer analyzer)
Builds a MemoryIndex from a lucene Document using an analyzer
MemoryIndexfromDocument(Iterable document, Analyzer analyzer, boolean storeOffsets, boolean storePayloads)
Builds a MemoryIndex from a lucene Document using an analyzer
voidreset()
Resets the MemoryIndex to its initial state and recycles all internal buffers.
floatsearch(Query query)
Convenience method that efficiently returns the relevance score by matching this index against the given Lucene query expression.