org.apache.lucene.luke.models.overview

## Class OverviewImpl

- java.lang.Object
- - org.apache.lucene.luke.models.LukeModel
  - - org.apache.lucene.luke.models.overview.OverviewImpl

- All Implemented Interfaces:
    Overview

      public final class OverviewImpl
      extends LukeModel
      implements Overview

  Default implementation of `Overview`

- - ### Field Summary

    - ### Fields inherited from class org.apache.lucene.luke.models.LukeModel

      `commit, dir, liveDocs, reader`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OverviewImpl(IndexReader reader, String indexPath)` Constructs an OverviewImpl that holds the given `IndexReader`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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 opened `Directory` 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 by `TermCountsOrder`
    `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`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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`

    - #### 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 by `TermCountsOrder`
      Specified by:
        `getSortedTermCounts` in interface `Overview`
      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 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

Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.