# Xapian::MultiValueSorter Class Reference

Sorter subclass which sorts by a several values. More...

Inheritance diagram for Xapian::MultiValueSorter:

[legend]

List of all members.

## Public Member Functions
virtual std::string | operator() (const Xapian::Document &doc) const
| This method takes a Document object and builds a key string from it.

## Detailed Description

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.

Deprecated:
  This class is deprecated - you should migrate to using MultiValueKeyMaker instead. Note that MultiValueSorter::add() becomes MultiValueKeyMaker::add_value(), but the sense of the direction flag is reversed (to be consistent with Enquire::set_sort_by_value()), 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);

## Member Function Documentation

virtual std::string Xapian::MultiValueSorter::operator() | ( | const Xapian::Document & | doc | ) | const`[virtual]`

This method takes a Document object and builds a key string from it.

These keys are then used for ordering or collapsing matching documents.

Implements Xapian::KeyMaker.

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

- xapian/keymaker.h