Class BitPostingIndexInputStream

    • Field Detail

      • logger

        protected static final org.slf4j.Logger logger
      • pointerList

        protected final java.util.Iterator<? extends BitIndexPointer> pointerList
        the lexicon input stream providing the offsets
      • file

        protected BitIn file
        The gamma compressed file containing the terms.
      • postingIteratorClass

        protected java.lang.Class<? extends IterablePosting> postingIteratorClass
      • postingConstructor

        protected java.lang.reflect.Constructor<? extends IterablePosting> postingConstructor
      • currentEntryCount

        protected int currentEntryCount
      • fieldCount

        protected int fieldCount
      • entriesSkipped

        protected int entriesSkipped
      • fileCount

        protected byte fileCount
      • currentFile

        protected byte currentFile
      • structureName

        protected java.lang.String structureName
    • Constructor Detail

      • BitPostingIndexInputStream

        public BitPostingIndexInputStream​(IndexOnDisk _index,
                                          java.lang.String _structureName,
                                          java.util.Iterator<? extends BitIndexPointer> _pointerList,
                                          java.lang.Class<? extends IterablePosting> _postingIteratorClass)
                                   throws java.io.IOException
        Constructs an instance of BitPostingIndexInputStream.
        Parameters:
        _index -
        _structureName -
        _pointerList -
        _postingIteratorClass -
        Throws:
        java.io.IOException
    • Method Detail

      • getFilename

        public static java.lang.String getFilename​(java.lang.String path,
                                                   java.lang.String prefix,
                                                   java.lang.String structureName,
                                                   byte fileCount,
                                                   byte fileId)
        Return filename
        Parameters:
        path -
        prefix -
        structureName -
        fileCount -
        fileId -
        Returns:
        filename
      • getFilename

        public static java.lang.String getFilename​(IndexOnDisk _index,
                                                   java.lang.String structureName,
                                                   byte fileCount,
                                                   byte fileId)
        Returns filename
        Parameters:
        _index -
        structureName -
        fileCount -
        fileId -
        Returns:
        filename
      • skip

        public void skip​(int numEntries)
                  throws java.io.IOException
        Specified by:
        skip in interface Skipable
        Throws:
        java.io.IOException
      • getNextPostings

        public IterablePosting getNextPostings()
                                        throws java.io.IOException
        Return the next IterablePosting object, or null if none defined. Use this method instead of hasNext() and next().
        Specified by:
        getNextPostings in interface PostingIndexInputStream
        Returns:
        IterablePosting postings for next object
        Throws:
        java.io.IOException - if an I/O problem occurs.
      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<IterablePosting>
      • getEntriesSkipped

        public int getEntriesSkipped()
        Returns the number of entries that were skipped during a call to the next().
        Specified by:
        getEntriesSkipped in interface PostingIndexInputStream
        Returns:
        int the number of entries skipped.
      • loadPostingIterator

        protected IterablePosting loadPostingIterator​(BitIndexPointer pointer)
                                               throws java.io.IOException
        Throws:
        java.io.IOException
      • 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
      • remove

        public void remove()
        Not supported
        Specified by:
        remove in interface java.util.Iterator<IterablePosting>