Class 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
    • Constructor Detail

      • Index

        public Index()
    • 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 interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException
      • makeDirectIndexRef

        protected static IndexRef makeDirectIndexRef​(Index index)
      • 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.