Class MemoryFieldsIndex
- java.lang.Object
-
- org.terrier.structures.Index
-
- org.terrier.realtime.memory.MemoryIndex
-
- org.terrier.realtime.memory.fields.MemoryFields
-
- org.terrier.realtime.memory.fields.MemoryFieldsIndex
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,UpdatableIndex
,WritableIndex
public class MemoryFieldsIndex extends MemoryFields
An in-memory incremental fields index (non-compressed).- Since:
- 4.0
- Author:
- Stuart Mackie
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MemoryFieldsIndex.Loader
-
Nested classes/interfaces inherited from class org.terrier.structures.Index
Index.DirectIndexRef
-
-
Field Summary
-
Fields inherited from class org.terrier.realtime.memory.fields.MemoryFields
docFields, fdpl, pipeline
-
Fields inherited from class org.terrier.realtime.memory.MemoryIndex
blocks, compressionDirectConfig, compressionInvertedConfig, direct, docPostings, document, fieldIDs, fields, fieldtags, indexingLock, inverted, lexicon, logger, metadata, pipeline_first, PIPELINE_NAMESPACE, stats
-
-
Constructor Summary
Constructors Constructor Description MemoryFieldsIndex()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
indexDocument(java.util.Map<java.lang.String,java.lang.String> docProperties, DocumentPostingList docContents)
Index a new document.void
indexDocument(Document doc)
Index a new document.protected DiskIndexWriter
makeDiskIndexWriter(java.lang.String path, java.lang.String prefix)
Index
merge(java.lang.String diskpath, java.lang.String diskprefix, java.lang.String newpath, java.lang.String newprefix)
Not implemented.-
Methods inherited from class org.terrier.realtime.memory.fields.MemoryFields
getDocumentIndex, getEndOfPipeline
-
Methods inherited from class org.terrier.realtime.memory.MemoryIndex
addToDocument, addToDocument, close, flush, getCollectionStatistics, getDirectIndex, getIndexRef, getIndexStructure, getIndexStructureInputStream, getInvertedIndex, getLexicon, getMetaIndex, hasIndexStructure, indexUnDocument, indexUnDocument, load_pipeline, removeDocument, toString, write
-
Methods inherited from class org.terrier.structures.Index
createIndex, createIndex, getEnd, getStart, hasIndexStructureInputStream, makeDirectIndexRef, setIndexLoadingProfileAsRetrieval
-
-
-
-
Method Detail
-
indexDocument
public void indexDocument(java.util.Map<java.lang.String,java.lang.String> docProperties, DocumentPostingList docContents) throws java.lang.Exception
Index a new document.- Specified by:
indexDocument
in interfaceUpdatableIndex
- Overrides:
indexDocument
in classMemoryIndex
- Throws:
java.lang.Exception
-
indexDocument
public void indexDocument(Document doc) throws java.lang.Exception
Index a new document.- Specified by:
indexDocument
in interfaceUpdatableIndex
- Overrides:
indexDocument
in classMemoryIndex
- Throws:
java.lang.Exception
-
makeDiskIndexWriter
protected DiskIndexWriter makeDiskIndexWriter(java.lang.String path, java.lang.String prefix)
- Overrides:
makeDiskIndexWriter
in classMemoryIndex
-
merge
public Index merge(java.lang.String diskpath, java.lang.String diskprefix, java.lang.String newpath, java.lang.String newprefix) throws java.io.IOException
Not implemented.- Throws:
java.io.IOException
-
-