Public Member Functions | List of all members
Xapian::MultiValueKeyMaker Class Reference

KeyMaker subclass which combines several values. More...

+ Inheritance diagram for Xapian::MultiValueKeyMaker:

Public Member Functions

virtual std::string operator() (const Xapian::Document &doc) const
 Build a key string for a Document. More...
 
- Public Member Functions inherited from Xapian::KeyMaker
virtual ~KeyMaker ()
 Virtual destructor, because we have virtual methods. More...
 

Detailed Description

KeyMaker subclass which combines several values.

When the result is used for sorting, 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. If reverse is true for a value, then the sort order for that value is reversed.

When used for collapsing, the documents will only be considered equal if all the values specified match. If none of the specified values are set then the generated key will be empty, so such documents won't be collapsed (which is consistent with the behaviour in the "collapse on a value" case). If you'd prefer that documents with none of the keys set are collapsed together, then you can set reverse for at least one of the values. Other than this, it isn't useful to set reverse for collapsing.

Member Function Documentation

virtual std::string Xapian::MultiValueKeyMaker::operator() ( const Xapian::Document doc) const
virtual

Build a key string for a Document.

These keys can be used for sorting or collapsing matching documents.

Parameters
docDocument object to build a key for.

Implements Xapian::KeyMaker.


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

Documentation for Xapian (version 1.2.23).
Generated on Mon Mar 28 2016 by Doxygen 1.8.5.