#include <sorter.h>
Inheritance diagram for Xapian::MultiValueSorter:
Public Member Functions | |
MultiValueSorter () | |
template<class Iterator> | |
MultiValueSorter (Iterator begin, Iterator end) | |
virtual std::string | operator() (const Xapian::Document &doc) const |
This method takes a Document object and builds a sort key from it. | |
void | add (Xapian::valueno valno, bool forward=true) |
virtual | ~MultiValueSorter () |
Private Attributes | |
std::vector< std::pair< Xapian::valueno, bool > > | valnos |
Results are ordered by the first value. In the event of a tie, the second is used. If this is the same for both, the third is used, and so on.
Definition at line 51 of file sorter.h.
Xapian::MultiValueSorter::MultiValueSorter | ( | Iterator | begin, | |
Iterator | end | |||
) | [inline] |
string Xapian::MultiValueSorter::operator() | ( | const Xapian::Document & | doc | ) | const [virtual] |
This method takes a Document object and builds a sort key from it.
Documents are then ordered by a string compare on the sort keys.
Implements Xapian::Sorter.
Definition at line 35 of file sorter.cc.
References Xapian::Document::get_value(), rare, and valnos.
void Xapian::MultiValueSorter::add | ( | Xapian::valueno | valno, | |
bool | forward = true | |||
) | [inline] |
std::vector<std::pair<Xapian::valueno, bool> > Xapian::MultiValueSorter::valnos [private] |