Class FSADocumentIndex

    • Field Detail

      • logger

        protected static final org.slf4j.Logger logger
      • lastDocid

        protected int lastDocid
      • docLengths

        protected int[] docLengths
    • Constructor Detail

      • FSADocumentIndex

        public FSADocumentIndex​(IndexOnDisk index,
                                java.lang.String structureName)
                         throws java.io.IOException
        Construct an instance of the class with
        Parameters:
        index -
        structureName -
        Throws:
        java.io.IOException
      • FSADocumentIndex

        protected FSADocumentIndex​(IndexOnDisk index,
                                   java.lang.String structureName,
                                   boolean initialise)
                            throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • initialise

        protected void initialise​(IndexOnDisk index,
                                  java.lang.String structureName)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • getDocumentLength

        public final int getDocumentLength​(int docid)
                                    throws java.io.IOException
        Return the length of the document.
        Specified by:
        getDocumentLength in interface DocumentIndex
        Returns:
        the length of the document.
        Throws:
        java.io.IOException
      • getDocumentEntry

        public final DocumentIndexEntry getDocumentEntry​(int docid)
                                                  throws java.io.IOException
        Return the document index entry based on its docid.
        Specified by:
        getDocumentEntry in interface DocumentIndex
        Returns:
        the document index entry based on its docid.
        Throws:
        java.io.IOException
      • getNumberOfDocuments

        public int getNumberOfDocuments()
        Return the number of documents.
        Specified by:
        getNumberOfDocuments in interface DocumentIndex
        Returns:
        the number of documents.