Package org.terrier.structures
Class Index
- java.lang.Object
-
- org.terrier.structures.Index
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
- Direct Known Subclasses:
MemoryIndex,MultiIndex,PropertiesIndex
public abstract class Index extends java.lang.Object implements java.io.CloseableBase class for all Index implementations
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIndex.DirectIndexRef
-
Constructor Summary
Constructors Constructor Description Index()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclose()static IndexcreateIndex()Deprecated.static IndexcreateIndex(java.lang.String path, java.lang.String prefix)Deprecated.abstract CollectionStatisticsgetCollectionStatistics()Get the collection statisticsabstract PostingIndex<?>getDirectIndex()Return the DirectIndex associated with this indexabstract DocumentIndexgetDocumentIndex()Return the DocumentIndex associated with this indexintgetEnd()Returns the last docid in this indexabstract IndexRefgetIndexRef()Returns a direct IndexRef to this indexjava.lang.ObjectgetIndexStructure(java.lang.String structureName)Return a particular index data structurejava.lang.ObjectgetIndexStructureInputStream(java.lang.String structureName)Return a particular index data structure input streamabstract PostingIndex<?>getInvertedIndex()Returns the InvertedIndex to use for this indexabstract Lexicon<java.lang.String>getLexicon()Return the Lexicon associated with this indexabstract MetaIndexgetMetaIndex()Get the Meta Index structureintgetStart()Returns the first docid in this indexbooleanhasIndexStructure(java.lang.String structureName)Returns true iff the structure existsbooleanhasIndexStructureInputStream(java.lang.String structureName)Returns true iff the structure input stream existsprotected static IndexRefmakeDirectIndexRef(Index index)static voidsetIndexLoadingProfileAsRetrieval(boolean yes)Deprecated.
-
-
-
Method Detail
-
getCollectionStatistics
public abstract CollectionStatistics getCollectionStatistics()
Get the collection statistics
-
getDirectIndex
public abstract PostingIndex<?> getDirectIndex()
Return the DirectIndex associated with this index
-
getDocumentIndex
public abstract DocumentIndex getDocumentIndex()
Return the DocumentIndex associated with this index
-
getIndexRef
public abstract IndexRef getIndexRef()
Returns a direct IndexRef to this index
-
getInvertedIndex
public abstract PostingIndex<?> getInvertedIndex()
Returns the InvertedIndex to use for this index
-
getLexicon
public abstract Lexicon<java.lang.String> getLexicon()
Return the Lexicon associated with this index
-
getMetaIndex
public abstract MetaIndex getMetaIndex()
Get the Meta Index structure
-
getIndexStructure
public java.lang.Object getIndexStructure(java.lang.String structureName)
Return a particular index data structure
-
getIndexStructureInputStream
public java.lang.Object getIndexStructureInputStream(java.lang.String structureName)
Return a particular index data structure input stream
-
hasIndexStructure
public boolean hasIndexStructure(java.lang.String structureName)
Returns true iff the structure exists
-
hasIndexStructureInputStream
public boolean hasIndexStructureInputStream(java.lang.String structureName)
Returns true iff the structure input stream exists
-
getStart
public int getStart()
Returns the first docid in this index
-
getEnd
public int getEnd()
Returns the last docid in this index
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
setIndexLoadingProfileAsRetrieval
@Deprecated public static void setIndexLoadingProfileAsRetrieval(boolean yes)
Deprecated.
-
createIndex
@Deprecated public static Index createIndex()
Deprecated.
-
createIndex
@Deprecated public static Index createIndex(java.lang.String path, java.lang.String prefix)
Deprecated.
-
-