org.apache.lucene.index

## Class MultiDocValues.MultiSortedSetDocValues

- java.lang.Object
- - org.apache.lucene.index.SortedSetDocValues
  - - org.apache.lucene.index.MultiDocValues.MultiSortedSetDocValues

- Enclosing class:
    MultiDocValues

      public static class MultiDocValues.MultiSortedSetDocValues
      extends SortedSetDocValues

  Implements MultiSortedSetDocValues over n subs, using an OrdinalMap
  NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int[]` | `docStarts` docbase for each leaf: parallel with `values`
    `MultiDocValues.OrdinalMap` | `mapping` ordinal map mapping ords from `values` to global ord space
    `SortedSetDocValues[]` | `values` leaf values

    - ### Fields inherited from class org.apache.lucene.index.SortedSetDocValues

      `NO_MORE_ORDS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MultiSortedSetDocValues(SortedSetDocValues[] values, int[] docStarts, MultiDocValues.OrdinalMap mapping)` Creates a new MultiSortedSetDocValues over `values`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getValueCount()` Returns the number of unique values.
    `BytesRef` | `lookupOrd(long ord)` Retrieves the value for the specified ordinal.
    `long` | `nextOrd()` Returns the next ordinal for the current document (previously set by `SortedSetDocValues.setDocument(int)`.
    `void` | `setDocument(int docID)` Sets iteration to the specified docID

    - ### Methods inherited from class org.apache.lucene.index.SortedSetDocValues

      `intersect, lookupTerm, termsEnum`

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

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

- - ### Field Detail

    - #### docStarts

          public final int[] docStarts

      docbase for each leaf: parallel with `values`

    - #### values

          public final SortedSetDocValues[] values

      leaf values

    - #### mapping

          public final MultiDocValues.OrdinalMap mapping

      ordinal map mapping ords from `values` to global ord space

  - ### Constructor Detail

    - #### MultiSortedSetDocValues

          public MultiSortedSetDocValues(SortedSetDocValues[] values,
                                         int[] docStarts,
                                         MultiDocValues.OrdinalMap mapping)
                                  throws IOException

      Creates a new MultiSortedSetDocValues over `values`
      Throws:
        `IOException`

  - ### Method Detail

    - #### nextOrd

          public long nextOrd()

      Description copied from class: `SortedSetDocValues`
      Returns the next ordinal for the current document (previously set by `SortedSetDocValues.setDocument(int)`.
      Specified by:
        `nextOrd` in class `SortedSetDocValues`
      Returns:
        next ordinal for the document, or `SortedSetDocValues.NO_MORE_ORDS`. ordinals are dense, start at 0, then increment by 1 for the next value in sorted order.

    - #### setDocument

          public void setDocument(int docID)

      Description copied from class: `SortedSetDocValues`
      Sets iteration to the specified docID
      Specified by:
        `setDocument` in class `SortedSetDocValues`
      Parameters:
        `docID` - document ID

    - #### lookupOrd

          public BytesRef lookupOrd(long ord)

      Description copied from class: `SortedSetDocValues`
      Retrieves the value for the specified ordinal. The returned `BytesRef` may be re-used across calls to lookupOrd so make sure to `copy it` if you want to keep it around.
      Specified by:
        `lookupOrd` in class `SortedSetDocValues`
      Parameters:
        `ord` - ordinal to lookup
      See Also:
        `SortedSetDocValues.nextOrd()`

    - #### getValueCount

          public long getValueCount()

      Description copied from class: `SortedSetDocValues`
      Returns the number of unique values.
      Specified by:
        `getValueCount` in class `SortedSetDocValues`
      Returns:
        number of unique values in this SortedDocValues. This is also equivalent to one plus the maximum ordinal.

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