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 openedDirectory
implementation class name.Optional<String>
getIndexFormat()
Returns the string representation for the Lucene segment version when the index was created.String
getIndexPath()
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.int
getNumDeletedDocs()
Returns the number of deleted documents in this index.int
getNumDocuments()
Returns the number of documents in this index.int
getNumFields()
Returns the number of fields in this index.long
getNumTerms()
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 byTermCountsOrder
List<TermStats>
getTopTerms(String field, int numTerms)
Returns the top indexed terms with their statistics for the specified field.boolean
hasDeletions()
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:Overview
Returns the currently opened index directory path, or the root directory path if multiple index directories are opened.- Specified by:
getIndexPath
in interfaceOverview
-
getNumFields
public int getNumFields()
Description copied from interface:Overview
Returns the number of fields in this index.- Specified by:
getNumFields
in interfaceOverview
-
getNumDocuments
public int getNumDocuments()
Description copied from interface:Overview
Returns the number of documents in this index.- Specified by:
getNumDocuments
in interfaceOverview
-
getNumTerms
public long getNumTerms()
Description copied from interface:Overview
Returns the total number of terms in this index.- Specified by:
getNumTerms
in interfaceOverview
-
hasDeletions
public boolean hasDeletions()
Description copied from interface:Overview
Returns true if this index includes deleted documents.- Specified by:
hasDeletions
in interfaceOverview
-
getNumDeletedDocs
public int getNumDeletedDocs()
Description copied from interface:Overview
Returns the number of deleted documents in this index.- Specified by:
getNumDeletedDocs
in interfaceOverview
-
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 interfaceOverview
-
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 interfaceOverview
-
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 interfaceOverview
-
getDirImpl
public Optional<String> getDirImpl()
Description copied from interface:Overview
Returns the currently openedDirectory
implementation class name. Empty Optional instance is returned if multiple indexes are opened.- Specified by:
getDirImpl
in interfaceOverview
-
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 interfaceOverview
-
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 interfaceOverview
-
getSortedTermCounts
public Map<String,Long> getSortedTermCounts(TermCountsOrder order)
Description copied from interface:Overview
Returns all fields with the number of terms for each field sorted byTermCountsOrder
- Specified by:
getSortedTermCounts
in 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:Overview
Returns the top indexed terms with their statistics for the specified field.- Specified by:
getTopTerms
in interfaceOverview
- Parameters:
field
- - the field namenumTerms
- - the max number of terms to be returned- Returns:
- the list of top terms and their document frequencies
-
-