org.apache.lucene.store.instantiated

## Class InstantiatedTerm

- java.lang.Object
- - org.apache.lucene.store.instantiated.InstantiatedTerm

- All Implemented Interfaces:
    java.io.Serializable

      public class InstantiatedTerm
      extends java.lang.Object
      implements java.io.Serializable

  A term in the inverted index, coupled to the documents it occurs in.
  See Also:
    `Term`, Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.util.Comparator<InstantiatedTerm>` | `comparator`
    `static java.util.Comparator` | `termComparator`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `binarySearchAssociatedDocuments(int target)`
    `int` | `binarySearchAssociatedDocuments(int target, int offset)`
    `int` | `binarySearchAssociatedDocuments(int target, int offset, int length)`
    `java.lang.String` | `field()`
    `InstantiatedTermDocumentInformation` | `getAssociatedDocument(int documentNumber)` Navigates to the view of this occurrences of this term in a specific document.
    `InstantiatedTermDocumentInformation[]` | `getAssociatedDocuments()` Meta data per document in which this term is occurring.
    `org.apache.lucene.index.Term` | `getTerm()`
    `int` | `getTermIndex()`
    `int` | `seekCeilingDocumentInformationIndex(int target)` Finds index to the first beyond the current whose document number is greater than or equal to target, -1 if there is no such element.
    `int` | `seekCeilingDocumentInformationIndex(int target, int startOffset)` Finds index to the first beyond the current whose document number is greater than or equal to target, -1 if there is no such element.
    `int` | `seekCeilingDocumentInformationIndex(int target, int startOffset, int endPosition)` Finds index to the first beyond the current whose document number is greater than or equal to target, -1 if there is no such element.
    `void` | `setTermIndex(int termIndex)`
    `java.lang.String` | `text()`
    `java.lang.String` | `toString()`

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

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

- - ### Field Detail

    - #### comparator

          public static final java.util.Comparator<InstantiatedTerm> comparator

    - #### termComparator

          public static final java.util.Comparator termComparator

  - ### Method Detail

    - #### getTerm

          public org.apache.lucene.index.Term getTerm()

      Returns:
        Term associated with this entry of the index object graph

    - #### getAssociatedDocuments

          public InstantiatedTermDocumentInformation[] getAssociatedDocuments()

      Meta data per document in which this term is occurring. Ordered by document number.
      Returns:
        Meta data per document in which this term is occurring.

    - #### seekCeilingDocumentInformationIndex

          public int seekCeilingDocumentInformationIndex(int target)

      Finds index to the first beyond the current whose document number is greater than or equal to target, -1 if there is no such element.
      Parameters:
        `target` - the document number to match
      Returns:
        -1 if there is no such element

    - #### seekCeilingDocumentInformationIndex

          public int seekCeilingDocumentInformationIndex(int target,
                                                         int startOffset)

      Finds index to the first beyond the current whose document number is greater than or equal to target, -1 if there is no such element.
      Parameters:
        `target` - the document number to match
        `startOffset` - associated documents index start offset
      Returns:
        -1 if there is no such element

    - #### seekCeilingDocumentInformationIndex

          public int seekCeilingDocumentInformationIndex(int target,
                                                         int startOffset,
                                                         int endPosition)

      Finds index to the first beyond the current whose document number is greater than or equal to target, -1 if there is no such element.
      Parameters:
        `target` - the document number to match
        `startOffset` - associated documents index start offset
        `endPosition` - associated documents index end position
      Returns:
        -1 if there is no such element

    - #### binarySearchAssociatedDocuments

          public int binarySearchAssociatedDocuments(int target)

    - #### binarySearchAssociatedDocuments

          public int binarySearchAssociatedDocuments(int target,
                                                     int offset)

    - #### binarySearchAssociatedDocuments

          public int binarySearchAssociatedDocuments(int target,
                                                     int offset,
                                                     int length)

      Parameters:
        `target` - value to search for in the array
        `offset` - index of the first valid value in the array
        `length` - number of valid values in the array
      Returns:
        index of an occurrence of key in array, or -(insertionIndex + 1) if key is not contained in array (insertionIndex is then the index at which key could be inserted).

    - #### getAssociatedDocument

          public InstantiatedTermDocumentInformation getAssociatedDocument(int documentNumber)

      Navigates to the view of this occurrences of this term in a specific document. This method is only used by InstantiatedIndex(IndexReader) and should not be optimized for less CPU at the cost of more RAM.
      Parameters:
        `documentNumber` - the n:th document in the index
      Returns:
        view of this term from specified document

    - #### field

          public final java.lang.String field()

    - #### text

          public final java.lang.String text()

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### getTermIndex

          public int getTermIndex()

    - #### setTermIndex

          public void setTermIndex(int termIndex)

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