Class Index

  • All Implemented Interfaces:, java.lang.AutoCloseable
    Direct Known Subclasses:
    MemoryIndex, MultiIndex, PropertiesIndex

    public abstract class Index
    extends java.lang.Object
    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()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface
      • makeDirectIndexRef

        protected static IndexRef makeDirectIndexRef​(Index index)
      • setIndexLoadingProfileAsRetrieval

        public static void setIndexLoadingProfileAsRetrieval​(boolean yes)
      • createIndex

        public static Index createIndex()
      • createIndex

        public static Index createIndex​(java.lang.String path,
                                        java.lang.String prefix)