xapian-core
1.4.27
|
MatchDecider filtering results based on whether document values are in a user-defined set. More...
#include <valuesetmatchdecider.h>
Public Member Functions | |
ValueSetMatchDecider (Xapian::valueno slot, bool inclusive_) | |
Construct a ValueSetMatchDecider. More... | |
void | add_value (const std::string &value) |
Add a value to the test set. More... | |
void | remove_value (const std::string &value) |
Remove a value from the test set. More... | |
bool | operator() (const Xapian::Document &doc) const |
Decide whether we want a particular document to be in the MSet. More... | |
Public Member Functions inherited from Xapian::MatchDecider | |
MatchDecider () | |
Default constructor. More... | |
virtual | ~MatchDecider () |
Destructor. More... | |
Private Attributes | |
std::set< std::string > | testset |
Set of values to test for. More... | |
valueno | valuenum |
The value slot to look in. More... | |
bool | inclusive |
Whether to include or exclude documents with the specified values. More... | |
MatchDecider filtering results based on whether document values are in a user-defined set.
Definition at line 44 of file valuesetmatchdecider.h.
|
inline |
Construct a ValueSetMatchDecider.
slot | The value slot number to look in. |
inclusive_ | If true, match decider accepts documents which have a value in the specified slot which is a member of the test set; if false, match decider accepts documents which do not have a value in the specified slot. |
Definition at line 68 of file valuesetmatchdecider.h.
|
inline |
Add a value to the test set.
value | The value to add to the test set. |
Definition at line 75 of file valuesetmatchdecider.h.
Referenced by DEFINE_TESTCASE().
|
virtual |
Decide whether we want a particular document to be in the MSet.
doc | The document to test. |
Implements Xapian::MatchDecider.
Definition at line 34 of file valuesetmatchdecider.cc.
References Xapian::Document::get_value().
|
inline |
Remove a value from the test set.
value | The value to remove from the test set. |
Definition at line 84 of file valuesetmatchdecider.h.
Referenced by DEFINE_TESTCASE().
|
private |
Whether to include or exclude documents with the specified values.
If true, documents with a value in the set are returned. If false, documents with a value not in the set are returned.
Definition at line 56 of file valuesetmatchdecider.h.
|
private |
Set of values to test for.
Definition at line 46 of file valuesetmatchdecider.h.
|
private |
The value slot to look in.
Definition at line 49 of file valuesetmatchdecider.h.