Lucene.Net  3.0.3
Lucene.Net is a port of the Lucene search engine library, written in C# and targeted at .NET runtime users.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Pages
Public Member Functions | Properties | List of all members
Lucene.Net.Search.FieldComparator.StringComparatorLocale Class Reference

Sorts by a field's value using the Collator for a given Locale. More...

Inherits Lucene.Net.Search.FieldComparator.

Public Member Functions

override int Compare (int slot1, int slot2)
 Compare hit at slot1 with hit at slot2.
 
override int CompareBottom (int doc)
 Compare the bottom of the queue with doc. This will only invoked after setBottom has been called. This should return the same result as Compare(int,int) } as if bottom were slot1 and the new document were slot 2.
 
override void Copy (int slot, int doc)
 This method is called when a new hit is competitive. You should copy any state associated with this document that will be required for future comparisons, into the specified slot.
 
override void SetNextReader (IndexReader reader, int docBase)
 Set a new Reader. All doc correspond to the current Reader.
 
override void SetBottom (int bottom)
 Set the bottom slot, ie the "weakest" (sorted last) entry in the queue. When CompareBottom is called, you should compare against this slot. This will always be called before CompareBottom.
 
- Public Member Functions inherited from Lucene.Net.Search.FieldComparator
virtual void SetScorer (Scorer scorer)
 Sets the Scorer to use in case a document's score is needed.
 

Properties

override IComparable this[int slot] [get]
 
- Properties inherited from Lucene.Net.Search.FieldComparator
abstract IComparable this[int slot] [get]
 Return the actual value in the slot.
 

Detailed Description

Sorts by a field's value using the Collator for a given Locale.

Definition at line 692 of file FieldComparator.cs.

Member Function Documentation

override int Lucene.Net.Search.FieldComparator.StringComparatorLocale.Compare ( int  slot1,
int  slot2 
)
virtual

Compare hit at slot1 with hit at slot2.

Parameters
slot1first slot to compare
slot2second slot to compare
Returns
any N < 0 if slot2's value is sorted after slot1, any N > 0 if the slot2's value is sorted before slot1 and 0 if they are equal

Implements Lucene.Net.Search.FieldComparator.

Definition at line 708 of file FieldComparator.cs.

override int Lucene.Net.Search.FieldComparator.StringComparatorLocale.CompareBottom ( int  doc)
virtual

Compare the bottom of the queue with doc. This will only invoked after setBottom has been called. This should return the same result as Compare(int,int) } as if bottom were slot1 and the new document were slot 2.

For a search that hits many results, this method will be the hotspot (invoked by far the most frequently).

Parameters
docthat was hit
Returns
any N < 0 if the doc's value is sorted after the bottom entry (not competitive), any N > 0 if the doc's value is sorted before the bottom entry and 0 if they are equal.

Implements Lucene.Net.Search.FieldComparator.

Definition at line 727 of file FieldComparator.cs.

override void Lucene.Net.Search.FieldComparator.StringComparatorLocale.Copy ( int  slot,
int  doc 
)
virtual

This method is called when a new hit is competitive. You should copy any state associated with this document that will be required for future comparisons, into the specified slot.

Parameters
slotwhich slot to copy the hit to
docdocID relative to current reader

Implements Lucene.Net.Search.FieldComparator.

Definition at line 745 of file FieldComparator.cs.

override void Lucene.Net.Search.FieldComparator.StringComparatorLocale.SetBottom ( int  slot)
virtual

Set the bottom slot, ie the "weakest" (sorted last) entry in the queue. When CompareBottom is called, you should compare against this slot. This will always be called before CompareBottom.

Parameters
slotthe currently weakest (sorted last) slot in the queue

Implements Lucene.Net.Search.FieldComparator.

Definition at line 755 of file FieldComparator.cs.

override void Lucene.Net.Search.FieldComparator.StringComparatorLocale.SetNextReader ( IndexReader  reader,
int  docBase 
)
virtual

Set a new Reader. All doc correspond to the current Reader.

Parameters
readercurrent reader
docBasedocBase of this reader

<throws> IOException </throws> <throws> IOException </throws>

Implements Lucene.Net.Search.FieldComparator.

Definition at line 750 of file FieldComparator.cs.

Property Documentation

override IComparable Lucene.Net.Search.FieldComparator.StringComparatorLocale.this[int slot]
get

Definition at line 761 of file FieldComparator.cs.


The documentation for this class was generated from the following file: