Class OverviewImpl

    • Constructor Detail

      • OverviewImpl

        public OverviewImpl​(IndexReader reader,
                            String indexPath)
        Constructs an OverviewImpl that holds the given IndexReader.
        Parameters:
        reader - - the index reader
        indexPath - - the (root) index directory path
        Throws:
        LukeException - - if an internal error is occurred when accessing index
    • Method Detail

      • getIndexPath

        public String getIndexPath()
        Description copied from interface: Overview
        Returns the currently opened index directory path, or the root directory path if multiple index directories are opened.
        Specified by:
        getIndexPath in interface Overview
      • getNumFields

        public int getNumFields()
        Description copied from interface: Overview
        Returns the number of fields in this index.
        Specified by:
        getNumFields in interface Overview
      • getNumDocuments

        public int getNumDocuments()
        Description copied from interface: Overview
        Returns the number of documents in this index.
        Specified by:
        getNumDocuments in interface Overview
      • getNumTerms

        public long getNumTerms()
        Description copied from interface: Overview
        Returns the total number of terms in this index.
        Specified by:
        getNumTerms in interface Overview
      • hasDeletions

        public boolean hasDeletions()
        Description copied from interface: Overview
        Returns true if this index includes deleted documents.
        Specified by:
        hasDeletions in interface Overview
      • getNumDeletedDocs

        public int getNumDeletedDocs()
        Description copied from interface: Overview
        Returns the number of deleted documents in this index.
        Specified by:
        getNumDeletedDocs in interface Overview
      • isOptimized

        public Optional<Boolean> isOptimized()
        Description copied from interface: Overview
        Returns true if the index is optimized. Empty Optional instance is returned if multiple indexes are opened.
        Specified by:
        isOptimized in interface Overview
      • getIndexVersion

        public Optional<Long> getIndexVersion()
        Description copied from interface: Overview
        Returns the version number when this index was opened. Empty Optional instance is returned if multiple indexes are opened.
        Specified by:
        getIndexVersion in interface Overview
      • getIndexFormat

        public Optional<String> getIndexFormat()
        Description copied from interface: Overview
        Returns the string representation for the Lucene segment version when the index was created. Empty Optional instance is returned if multiple indexes are opened.
        Specified by:
        getIndexFormat in interface Overview
      • getDirImpl

        public Optional<String> getDirImpl()
        Description copied from interface: Overview
        Returns the currently opened Directory implementation class name. Empty Optional instance is returned if multiple indexes are opened.
        Specified by:
        getDirImpl in interface Overview
      • getCommitDescription

        public Optional<String> getCommitDescription()
        Description copied from interface: Overview
        Returns the information of the commit point that reader has opened. Empty Optional instance is returned if multiple indexes are opened.
        Specified by:
        getCommitDescription in interface Overview
      • getCommitUserData

        public Optional<String> getCommitUserData()
        Description copied from interface: Overview
        Returns the user provided data for the commit point. Empty Optional instance is returned if multiple indexes are opened.
        Specified by:
        getCommitUserData in interface Overview
      • getTopTerms

        public List<TermStats> getTopTerms​(String field,
                                           int numTerms)
        Description copied from interface: Overview
        Returns the top indexed terms with their statistics for the specified field.
        Specified by:
        getTopTerms in interface Overview
        Parameters:
        field - - the field name
        numTerms - - the max number of terms to be returned
        Returns:
        the list of top terms and their document frequencies