Class SortingAtomicReader
An AtomicReader which supports sorting documents by a given
Sort. You can use this class to sort an index as follows:
IndexWriter writer; // writer to which the sorted index will be added
DirectoryReader reader; // reader on the input index
Sort sort; // determines how the documents are sorted
AtomicReader sortingReader = SortingAtomicReader.Wrap(SlowCompositeReaderWrapper.Wrap(reader), sort);
writer.AddIndexes(reader);
reader.Dispose(); // alternatively, you can use a using block
writer.Dispose(); // alternatively, you can use a using block
This is a Lucene.NET EXPERIMENTAL API, use at your own risk
Inheritance
System.Object
SortingAtomicReader
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: Lucene.Net.Misc.dll
Syntax
public class SortingAtomicReader : FilterAtomicReader, IDisposable
Properties
|
Improve this Doc
View Source
Fields
Declaration
public override Fields Fields { get; }
Property Value
Overrides
|
Improve this Doc
View Source
LiveDocs
Declaration
public override IBits LiveDocs { get; }
Property Value
Overrides
Methods
|
Improve this Doc
View Source
Document(Int32, StoredFieldVisitor)
Declaration
public override void Document(int docID, StoredFieldVisitor visitor)
Parameters
Overrides
|
Improve this Doc
View Source
GetBinaryDocValues(String)
Declaration
public override BinaryDocValues GetBinaryDocValues(string field)
Parameters
Type |
Name |
Description |
System.String |
field |
|
Returns
Overrides
|
Improve this Doc
View Source
GetDocsWithField(String)
Declaration
public override IBits GetDocsWithField(string field)
Parameters
Type |
Name |
Description |
System.String |
field |
|
Returns
Overrides
|
Improve this Doc
View Source
GetNormValues(String)
Declaration
public override NumericDocValues GetNormValues(string field)
Parameters
Type |
Name |
Description |
System.String |
field |
|
Returns
Overrides
|
Improve this Doc
View Source
GetNumericDocValues(String)
Declaration
public override NumericDocValues GetNumericDocValues(string field)
Parameters
Type |
Name |
Description |
System.String |
field |
|
Returns
Overrides
|
Improve this Doc
View Source
GetSortedDocValues(String)
Declaration
public override SortedDocValues GetSortedDocValues(string field)
Parameters
Type |
Name |
Description |
System.String |
field |
|
Returns
Overrides
|
Improve this Doc
View Source
GetSortedSetDocValues(String)
Declaration
public override SortedSetDocValues GetSortedSetDocValues(string field)
Parameters
Type |
Name |
Description |
System.String |
field |
|
Returns
Overrides
|
Improve this Doc
View Source
GetTermVectors(Int32)
Declaration
public override Fields GetTermVectors(int docID)
Parameters
Type |
Name |
Description |
System.Int32 |
docID |
|
Returns
Overrides
|
Improve this Doc
View Source
Wrap(AtomicReader, Sort)
Return a sorted view of reader
according to the order
defined by sort
. If the reader is already sorted, this
method might return the reader as-is.
Declaration
public static AtomicReader Wrap(AtomicReader reader, Sort sort)
Parameters
Returns
Implements
System.IDisposable
Extension Methods