org.apache.lucene.luke.models.documents

## Interface Documents

- All Known Implementing Classes:
    DocumentsImpl

      public interface Documents

  A dedicated interface for Luke's Documents tab.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Optional<Term>` | `firstTerm(String field)` Returns the first indexed term in the specified field.
    `Optional<Integer>` | `firstTermDoc()` Returns the first document id (posting) associated with the current term.
    `String` | `getCurrentField()` Returns the current target field name.
    `Optional<Integer>` | `getDocFreq()` Returns the document frequency for the current term (the number of documents containing the current term.) Empty Optional instance is returned if the terms iterator has not been positioned yet.
    `List<DocumentField>` | `getDocumentFields(int docid)` Returns the list of field information and field data for the specified document.
    `Optional<DocValues>` | `getDocValues(int docid, String field)` Returns the doc values for the specified field in the specified document.
    `Collection<String>` | `getFieldNames()` Returns field names in this index.
    `int` | `getMaxDoc()` Returns one greater than the largest possible document number.
    `List<TermPosting>` | `getTermPositions()` Returns the list of the position information for the current posting.
    `List<TermVectorEntry>` | `getTermVectors(int docid, String field)` Returns the term vectors for the specified field in the specified document.
    `boolean` | `isLive(int docid)` Returns true if the document with the specified `docid` is not deleted, otherwise false.
    `Optional<Term>` | `nextTerm()` Increments the terms iterator and returns the next indexed term for the target field.
    `Optional<Integer>` | `nextTermDoc()` Increments the postings iterator and returns the next document id (posting) for the current term.
    `Optional<Term>` | `seekTerm(String termText)` Seeks to the specified term, if it exists, or to the next (ceiling) term.

- - ### Method Detail

    - #### getMaxDoc

          int getMaxDoc()

      Returns one greater than the largest possible document number.

    - #### getFieldNames

          Collection<String> getFieldNames()

      Returns field names in this index.

    - #### isLive

          boolean isLive(int docid)

      Returns true if the document with the specified `docid` is not deleted, otherwise false.
      Parameters:
        `docid` - - document id

    - #### getDocumentFields

          List<DocumentField> getDocumentFields(int docid)

      Returns the list of field information and field data for the specified document.
      Parameters:
        `docid` - - document id
      Throws:
        `LukeException` - - if an internal error occurs when accessing index

    - #### getCurrentField

          String getCurrentField()

      Returns the current target field name.

    - #### firstTerm

          Optional<Term> firstTerm(String field)

      Returns the first indexed term in the specified field. Empty Optional instance is returned if no terms are available for the field.
      Parameters:
        `field` - - field name
      Throws:
        `LukeException` - - if an internal error occurs when accessing index

    - #### nextTerm

          Optional<Term> nextTerm()

      Increments the terms iterator and returns the next indexed term for the target field. Empty Optional instance is returned if the terms iterator has not been positioned yet, or has been exhausted.
      Returns:
        next term, if exists, or empty
      Throws:
        `LukeException` - - if an internal error occurs when accessing index

    - #### seekTerm

          Optional<Term> seekTerm(String termText)

      Seeks to the specified term, if it exists, or to the next (ceiling) term. Returns the term that was found. Empty Optional instance is returned if the terms iterator has not been positioned yet, or has been exhausted.
      Parameters:
        `termText` - - term to seek
      Returns:
        found term, if exists, or empty
      Throws:
        `LukeException` - - if an internal error occurs when accessing index

    - #### firstTermDoc

          Optional<Integer> firstTermDoc()

      Returns the first document id (posting) associated with the current term. Empty Optional instance is returned if the terms iterator has not been positioned yet, or the postings iterator has been exhausted.
      Returns:
        document id, if exists, or empty
      Throws:
        `LukeException` - - if an internal error occurs when accessing index

    - #### nextTermDoc

          Optional<Integer> nextTermDoc()

      Increments the postings iterator and returns the next document id (posting) for the current term. Empty Optional instance is returned if the terms iterator has not been positioned yet, or the postings iterator has been exhausted.
      Returns:
        document id, if exists, or empty
      Throws:
        `LukeException` - - if an internal error occurs when accessing index

    - #### getTermPositions

          List<TermPosting> getTermPositions()

      Returns the list of the position information for the current posting.
      Throws:
        `LukeException` - - if an internal error occurs when accessing index

    - #### getDocFreq

          Optional<Integer> getDocFreq()

      Returns the document frequency for the current term (the number of documents containing the current term.) Empty Optional instance is returned if the terms iterator has not been positioned yet.
      Throws:
        `LukeException` - - if an internal error occurs when accessing index

    - #### getTermVectors

          List<TermVectorEntry> getTermVectors(int docid,
                                               String field)

      Returns the term vectors for the specified field in the specified document. If no term vector is available for the field, empty list is returned.
      Parameters:
        `docid` - - document id
        `field` - - field name
      Returns:
        list of term vector elements
      Throws:
        `LukeException` - - if an internal error occurs when accessing index

    - #### getDocValues

          Optional<DocValues> getDocValues(int docid,
                                           String field)

      Returns the doc values for the specified field in the specified document. Empty Optional instance is returned if no doc values is available for the field.
      Parameters:
        `docid` - - document id
        `field` - - field name
      Returns:
        doc values, if exists, or empty
      Throws:
        `LukeException` - - if an internal error occurs when accessing index

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