Class RandomAccessOrds
Extension of SortedSetDocValues that supports random access to the ordinals of a document.
Operations via this API are independent of the iterator api (NextOrd()) and do not impact its state. Codecs can optionally extend this API if they support constant-time access to ordinals for the document.Inherited Members
Namespace: Lucene.Net.Index
Assembly: Lucene.Net.dll
Syntax
public abstract class RandomAccessOrds : SortedSetDocValues
Constructors
RandomAccessOrds()
Sole constructor. (For invocation by subclass constructors, typically implicit.)
Declaration
protected RandomAccessOrds()
Properties
Cardinality
Gets the cardinality for the current document (previously set by SetDocument(int).
Declaration
public abstract int Cardinality { get; }
Property Value
Type | Description |
---|---|
int |
Methods
OrdAt(int)
Retrieve the ordinal for the current document (previously set by SetDocument(int) at the specified index.
An index ranges from0
to Cardinality-1
.
The first ordinal value is at index 0
, the next at index 1
,
and so on, as for array indexing.
Declaration
public abstract long OrdAt(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index | index of the ordinal for the document. |
Returns
Type | Description |
---|---|
long | ordinal for the document at the specified index. |