Package org.apache.lucene.sandbox.facet.iterators

# Class CandidateSetOrdinalIterator

java.lang.Object
org.apache.lucene.sandbox.facet.iterators.CandidateSetOrdinalIterator

All Implemented Interfaces:
  `OrdinalIterator`

public final class CandidateSetOrdinalIterator extends Object implements OrdinalIterator
`OrdinalIterator` that filters out ordinals from delegate if they are not in the candidate set. Can be handy to get results only for specific facets.

WARNING: This API is experimental and might change in incompatible ways in the next release.

## Field Summary

### Fields inherited from interface org.apache.lucene.sandbox.facet.iterators.OrdinalIterator

`EMPTY, NO_MORE_ORDS`

## Constructor Summary

Constructors
Constructor
Description
`CandidateSetOrdinalIterator(FacetRecorder facetRecorder, FacetLabel[] candidateLabels, LabelToOrd labelToOrd)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`int`
`nextOrd()`
Returns next ord or `OrdinalIterator.NO_MORE_ORDS`.

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

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

### Methods inherited from interface org.apache.lucene.sandbox.facet.iterators.OrdinalIterator

`toArray`

## Constructor Details

### CandidateSetOrdinalIterator

public CandidateSetOrdinalIterator(FacetRecorder facetRecorder, FacetLabel[] candidateLabels, LabelToOrd labelToOrd) throws IOException
Constructor.

Throws:
  `IOException`

## Method Details

### nextOrd

public int nextOrd() throws IOException
Description copied from interface: `OrdinalIterator`
Returns next ord or `OrdinalIterator.NO_MORE_ORDS`. *

Specified by:
  `nextOrd` in interface `OrdinalIterator`
Throws:
  `IOException`