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.Closeable
Base class for all Index implementations
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Index.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 void
close()
static Index
createIndex()
Deprecated.static Index
createIndex(java.lang.String path, java.lang.String prefix)
Deprecated.abstract CollectionStatistics
getCollectionStatistics()
Get the collection statisticsabstract PostingIndex<?>
getDirectIndex()
Return the DirectIndex associated with this indexabstract DocumentIndex
getDocumentIndex()
Return the DocumentIndex associated with this indexint
getEnd()
Returns the last docid in this indexabstract IndexRef
getIndexRef()
Returns a direct IndexRef to this indexjava.lang.Object
getIndexStructure(java.lang.String structureName)
Return a particular index data structurejava.lang.Object
getIndexStructureInputStream(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 MetaIndex
getMetaIndex()
Get the Meta Index structureint
getStart()
Returns the first docid in this indexboolean
hasIndexStructure(java.lang.String structureName)
Returns true iff the structure existsboolean
hasIndexStructureInputStream(java.lang.String structureName)
Returns true iff the structure input stream existsprotected static IndexRef
makeDirectIndexRef(Index index)
static void
setIndexLoadingProfileAsRetrieval(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:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in 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.
-
-