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 : SortedSetDocValuesConstructors
| Improve this Doc View SourceRandomAccessOrds()
Sole constructor. (For invocation by subclass constructors, typically implicit.)
Declaration
protected RandomAccessOrds()Methods
| Improve this Doc View SourceCardinality()
Returns the cardinality for the current document (previously set by SetDocument(Int32).
Declaration
public abstract int Cardinality()Returns
| Type | Description | 
|---|---|
| System.Int32 | 
OrdAt(Int32)
Retrieve the ordinal for the current document (previously set by SetDocument(Int32) at the specified index.
An index ranges from 0 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 | 
|---|---|---|
| System.Int32 | index | index of the ordinal for the document. | 
Returns
| Type | Description | 
|---|---|
| System.Int64 | ordinal for the document at the specified index. |