Package org.apache.lucene.index

# Class DocValuesSkipper

java.lang.Object
org.apache.lucene.index.DocValuesSkipper

public abstract class DocValuesSkipper extends Object
Skipper for `DocValues`.

A skipper has a position that can only be advanced via `advance(int)`. The next advance position must be greater than `maxDocID(int)` at level 0. A skipper's position, along with a `level`, determines the interval at which the skipper is currently situated.

## Constructor Summary

Constructors
Constructor
Description
`DocValuesSkipper()`

## Method Summary

Modifier and Type
Method
Description
`abstract void`
`advance(int target)`
Advance this skipper so that all levels contain the next document on or after `target`.
`final void`
`advance(long minValue, long maxValue)`
Advance this skipper so that all levels intersects the range given by `minValue` and `maxValue`.
`abstract int`
`docCount()`
Return the global number of documents with a value for the field.
`abstract int`
`docCount(int level)`
Return the number of documents that have a value in the interval associated with the given level.
`abstract int`
`maxDocID(int level)`
Return the maximum doc ID of the interval on the given level, inclusive.
`abstract long`
`maxValue()`
Return the global maximum value.
`abstract long`
`maxValue(int level)`
Return the maximum value of the interval at the given level, inclusive.
`abstract int`
`minDocID(int level)`
Return the minimum doc ID of the interval on the given level, inclusive.
`abstract long`
`minValue()`
Return the global minimum value.
`abstract long`
`minValue(int level)`
Return the minimum value of the interval at the given level, inclusive.
`abstract int`
`numLevels()`
Return the number of levels.

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

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

## Constructor Details

### DocValuesSkipper

public DocValuesSkipper()

## Method Details

### advance

public abstract void advance(int target) throws IOException
Advance this skipper so that all levels contain the next document on or after `target`.

NOTE: The behavior is undefined if `target` is less than or equal to `maxDocID(0)`.

NOTE: `minDocID(0)` may return a doc ID that is greater than `target` if the target document doesn't have a value.

Throws:
  `IOException`

### numLevels

public abstract int numLevels()
Return the number of levels. This number may change when moving to a different interval.

### minDocID

public abstract int minDocID(int level)
Return the minimum doc ID of the interval on the given level, inclusive. This returns `-1` if `advance(int)` has not been called yet and `DocIdSetIterator.NO_MORE_DOCS` if the iterator is exhausted. This method is non-increasing when `level` increases. Said otherwise `minDocID(level+1) <= minDocId(level)`.

### maxDocID

public abstract int maxDocID(int level)
Return the maximum doc ID of the interval on the given level, inclusive. This returns `-1` if `advance(int)` has not been called yet and `DocIdSetIterator.NO_MORE_DOCS` if the iterator is exhausted. This method is non-decreasing when `level` decreases. Said otherwise `maxDocID(level+1) >= maxDocId(level)`.

### minValue

public abstract long minValue(int level)
Return the minimum value of the interval at the given level, inclusive.

NOTE: It is only guaranteed that values in this interval are greater than or equal the returned value. There is no guarantee that one document actually has this value.

### maxValue

public abstract long maxValue(int level)
Return the maximum value of the interval at the given level, inclusive.

NOTE: It is only guaranteed that values in this interval are less than or equal the returned value. There is no guarantee that one document actually has this value.

### docCount

public abstract int docCount(int level)
Return the number of documents that have a value in the interval associated with the given level.

### minValue

public abstract long minValue()
Return the global minimum value.

NOTE: It is only guaranteed that values are greater than or equal the returned value. There is no guarantee that one document actually has this value.

### maxValue

public abstract long maxValue()
Return the global maximum value.

NOTE: It is only guaranteed that values are less than or equal the returned value. There is no guarantee that one document actually has this value.

### docCount

public abstract int docCount()
Return the global number of documents with a value for the field.

### advance

public final void advance(long minValue, long maxValue) throws IOException
Advance this skipper so that all levels intersects the range given by `minValue` and `maxValue`. If there are no intersecting levels, the skipper is exhausted.

Throws:
  `IOException`