C# Class Lucene.Net.Index.Sorter.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 @lucene.experimental
Inheritance: FilterAtomicReader
Exibir arquivo Open project: apache/lucenenet Class Usage Examples

Public Methods

Method Description
Document ( int docID, StoredFieldVisitor visitor ) : void
GetBinaryDocValues ( string field ) : BinaryDocValues
GetDocsWithField ( string field ) : Bits
GetNormValues ( string field ) : NumericDocValues
GetNumericDocValues ( string field ) : NumericDocValues
GetSortedDocValues ( string field ) : SortedDocValues
GetSortedSetDocValues ( string field ) : SortedSetDocValues
GetTermVectors ( int docID ) : Fields
Wrap ( AtomicReader reader, Lucene.Net.Search.Sort sort ) : AtomicReader

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.

Private Methods

Method Description
SortingAtomicReader ( AtomicReader @in, Lucene.Net.Util.Sorter docMap ) : System
Wrap ( AtomicReader reader, Lucene.Net.Util.Sorter docMap ) : AtomicReader

Expert: same as Wrap(AtomicReader, Sort) but operates directly on a Sorter.DocMap.

Method Details

Document() public method

public Document ( int docID, StoredFieldVisitor visitor ) : void
docID int
visitor StoredFieldVisitor
return void

GetBinaryDocValues() public method

public GetBinaryDocValues ( string field ) : BinaryDocValues
field string
return BinaryDocValues

GetDocsWithField() public method

public GetDocsWithField ( string field ) : Bits
field string
return Bits

GetNormValues() public method

public GetNormValues ( string field ) : NumericDocValues
field string
return NumericDocValues

GetNumericDocValues() public method

public GetNumericDocValues ( string field ) : NumericDocValues
field string
return NumericDocValues

GetSortedDocValues() public method

public GetSortedDocValues ( string field ) : SortedDocValues
field string
return SortedDocValues

GetSortedSetDocValues() public method

public GetSortedSetDocValues ( string field ) : SortedSetDocValues
field string
return SortedSetDocValues

GetTermVectors() public method

public GetTermVectors ( int docID ) : Fields
docID int
return Fields

Wrap() public static method

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.
public static Wrap ( AtomicReader reader, Lucene.Net.Search.Sort sort ) : AtomicReader
reader AtomicReader
sort Lucene.Net.Search.Sort
return AtomicReader