# Uses of Class
org.apache.lucene.index.SortedDocValues

Packages that use SortedDocValues
Package
Description
org.apache.lucene.codecs
Codecs API: API for customization of the encoding and structure of the index.
org.apache.lucene.index
Code to maintain and access indices.
org.apache.lucene.search
Code to search indices.
org.apache.lucene.search.comparators
Comparators, used to compare hits so as to determine their sort order when collecting the top results with `TopFieldCollector`.

## Uses of SortedDocValues in org.apache.lucene.codecs

Methods in org.apache.lucene.codecs that return SortedDocValues
Modifier and Type
Method
Description
`abstract SortedDocValues`
DocValuesProducer.`getSorted(FieldInfo field)`
Returns `SortedDocValues` for this field.

## Uses of SortedDocValues in org.apache.lucene.index

Subclasses of SortedDocValues in org.apache.lucene.index
Modifier and Type
Class
Description
`class`
`FilterSortedDocValues`
Delegates all methods to a wrapped `SortedDocValues`.
`static class`
`MultiDocValues.MultiSortedDocValues`
Implements SortedDocValues over n subs, using an OrdinalMap
Fields in org.apache.lucene.index declared as SortedDocValues
Modifier and Type
Field
Description
`protected final SortedDocValues`
FilterSortedDocValues.`in`
Wrapped values
`final SortedDocValues[]`
MultiDocValues.MultiSortedDocValues.`values`
leaf values
Methods in org.apache.lucene.index that return SortedDocValues
Modifier and Type
Method
Description
`static final SortedDocValues`
DocValues.`emptySorted()`
An empty SortedDocValues which returns `BytesRef.EMPTY_BYTES` for every document
`SortedDocValues`
IndexSorter.SortedDocValuesProvider.`get(LeafReader reader)`
Returns the SortedDocValues instance for this LeafReader
`static SortedDocValues`
DocValues.`getSorted(LeafReader reader, String field)`
Returns SortedDocValues for the field, or `DocValues.emptySorted()` if it has none.
`SortedDocValues`
EmptyDocValuesProducer.`getSorted(FieldInfo field)`
`final SortedDocValues`
CodecReader.`getSortedDocValues(String field)`
`SortedDocValues`
ExitableDirectoryReader.ExitableFilterAtomicReader.`getSortedDocValues(String field)`
`SortedDocValues`
FilterLeafReader.`getSortedDocValues(String field)`
`abstract SortedDocValues`
LeafReader.`getSortedDocValues(String field)`
Returns `SortedDocValues` for this field, or null if no `SortedDocValues` were indexed for this field.
`SortedDocValues`
ParallelLeafReader.`getSortedDocValues(String field)`
`static SortedDocValues`
MultiDocValues.`getSortedValues(IndexReader r, String field)`
Returns a SortedDocValues for a reader's docvalues (potentially doing extremely slow things).
`static SortedDocValues`
DocValues.`unwrapSingleton(SortedSetDocValues dv)`
Returns a single-valued view of the SortedSetDocValues, if it was previously wrapped with `DocValues.singleton(SortedDocValues)`, or null.
Methods in org.apache.lucene.index with parameters of type SortedDocValues
Modifier and Type
Method
Description
`static OrdinalMap`
OrdinalMap.`build(IndexReader.CacheKey owner, SortedDocValues[] values, float acceptableOverheadRatio)`
Create an ordinal map that uses the number of unique values of each `SortedDocValues` instance as a weight.
`static SortedSetDocValues`
DocValues.`singleton(SortedDocValues dv)`
Returns a multi-valued view over the provided SortedDocValues
Constructors in org.apache.lucene.index with parameters of type SortedDocValues
Modifier
Constructor
Description
``
`FilterSortedDocValues(SortedDocValues in)`
Sole constructor
``
`MultiSortedDocValues(SortedDocValues[] values, int[] docStarts, OrdinalMap mapping, long totalCost)`
Creates a new MultiSortedDocValues over `values`

## Uses of SortedDocValues in org.apache.lucene.search

Methods in org.apache.lucene.search that return SortedDocValues
Modifier and Type
Method
Description
`static SortedDocValues`
SortedSetSelector.`wrap(SortedSetDocValues sortedSet, SortedSetSelector.Type selector)`
Wraps a multi-valued SortedSetDocValues as a single-valued view, using the specified selector

## Uses of SortedDocValues in org.apache.lucene.search.comparators

Methods in org.apache.lucene.search.comparators that return SortedDocValues
Modifier and Type
Method
Description
`protected SortedDocValues`
TermOrdValComparator.`getSortedDocValues(LeafReaderContext context, String field)`
Retrieves the SortedDocValues for the field in this segment