Sorter subclass which sorts by a several values. More...
Public Member Functions | |
virtual std::string | operator() (const Xapian::Document &doc) const |
Build a key string for a Document. More... | |
![]() | |
virtual | ~KeyMaker () |
Virtual destructor, because we have virtual methods. More... | |
Sorter subclass which sorts by a several values.
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.
So:
MultiValueSorter sorter; // Primary ordering is forwards on value 4. sorter.add(4); // Secondary ordering is reverse on value 5. sorter.add(5, false);
becomes:
MultiValueKeyMaker sorter; // Primary ordering is forwards on value 4. sorter.add_value(4); // Secondary ordering is reverse on value 5. sorter.add_value(5, true);
|
virtual |
Build a key string for a Document.
These keys can be used for sorting or collapsing matching documents.
doc | Document object to build a key for. |
Implements Xapian::KeyMaker.