Class OverviewImpl
- java.lang.Object
-
- org.apache.lucene.luke.models.LukeModel
-
- org.apache.lucene.luke.models.overview.OverviewImpl
-
-
Constructor Summary
Constructors Constructor Description OverviewImpl(IndexReader reader, String indexPath)Constructs an OverviewImpl that holds the givenIndexReader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<String>getCommitDescription()Returns the information of the commit point that reader has opened.Optional<String>getCommitUserData()Returns the user provided data for the commit point.Optional<String>getDirImpl()Returns the currently openedDirectoryimplementation class name.Optional<String>getIndexFormat()Returns the string representation for the Lucene segment version when the index was created.StringgetIndexPath()Returns the currently opened index directory path, or the root directory path if multiple index directories are opened.Optional<Long>getIndexVersion()Returns the version number when this index was opened.intgetNumDeletedDocs()Returns the number of deleted documents in this index.intgetNumDocuments()Returns the number of documents in this index.intgetNumFields()Returns the number of fields in this index.longgetNumTerms()Returns the total number of terms in this index.Map<String,Long>getSortedTermCounts(TermCountsOrder order)Returns all fields with the number of terms for each field sorted byTermCountsOrderList<TermStats>getTopTerms(String field, int numTerms)Returns the top indexed terms with their statistics for the specified field.booleanhasDeletions()Returns true if this index includes deleted documents.Optional<Boolean>isOptimized()Returns true if the index is optimized.-
Methods inherited from class org.apache.lucene.luke.models.LukeModel
getFieldNames
-
-
-
-
Constructor Detail
-
OverviewImpl
public OverviewImpl(IndexReader reader, String indexPath)
Constructs an OverviewImpl that holds the givenIndexReader.- Parameters:
reader- - the index readerindexPath- - 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:OverviewReturns the currently opened index directory path, or the root directory path if multiple index directories are opened.- Specified by:
getIndexPathin interfaceOverview
-
getNumFields
public int getNumFields()
Description copied from interface:OverviewReturns the number of fields in this index.- Specified by:
getNumFieldsin interfaceOverview
-
getNumDocuments
public int getNumDocuments()
Description copied from interface:OverviewReturns the number of documents in this index.- Specified by:
getNumDocumentsin interfaceOverview
-
getNumTerms
public long getNumTerms()
Description copied from interface:OverviewReturns the total number of terms in this index.- Specified by:
getNumTermsin interfaceOverview
-
hasDeletions
public boolean hasDeletions()
Description copied from interface:OverviewReturns true if this index includes deleted documents.- Specified by:
hasDeletionsin interfaceOverview
-
getNumDeletedDocs
public int getNumDeletedDocs()
Description copied from interface:OverviewReturns the number of deleted documents in this index.- Specified by:
getNumDeletedDocsin interfaceOverview
-
isOptimized
public Optional<Boolean> isOptimized()
Description copied from interface:OverviewReturns true if the index is optimized. Empty Optional instance is returned if multiple indexes are opened.- Specified by:
isOptimizedin interfaceOverview
-
getIndexVersion
public Optional<Long> getIndexVersion()
Description copied from interface:OverviewReturns the version number when this index was opened. Empty Optional instance is returned if multiple indexes are opened.- Specified by:
getIndexVersionin interfaceOverview
-
getIndexFormat
public Optional<String> getIndexFormat()
Description copied from interface:OverviewReturns 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:
getIndexFormatin interfaceOverview
-
getDirImpl
public Optional<String> getDirImpl()
Description copied from interface:OverviewReturns the currently openedDirectoryimplementation class name. Empty Optional instance is returned if multiple indexes are opened.- Specified by:
getDirImplin interfaceOverview
-
getCommitDescription
public Optional<String> getCommitDescription()
Description copied from interface:OverviewReturns the information of the commit point that reader has opened. Empty Optional instance is returned if multiple indexes are opened.- Specified by:
getCommitDescriptionin interfaceOverview
-
getCommitUserData
public Optional<String> getCommitUserData()
Description copied from interface:OverviewReturns the user provided data for the commit point. Empty Optional instance is returned if multiple indexes are opened.- Specified by:
getCommitUserDatain interfaceOverview
-
getSortedTermCounts
public Map<String,Long> getSortedTermCounts(TermCountsOrder order)
Description copied from interface:OverviewReturns all fields with the number of terms for each field sorted byTermCountsOrder- Specified by:
getSortedTermCountsin interfaceOverview- Parameters:
order- - the sort order- Returns:
- the ordered map of terms and their frequencies
-
getTopTerms
public List<TermStats> getTopTerms(String field, int numTerms)
Description copied from interface:OverviewReturns the top indexed terms with their statistics for the specified field.- Specified by:
getTopTermsin interfaceOverview- Parameters:
field- - the field namenumTerms- - the max number of terms to be returned- Returns:
- the list of top terms and their document frequencies
-
-