xapian-core  2.0.0
valuesetmatchdecider.cc
Go to the documentation of this file.
1 
4 /* Copyright 2008 Lemur Consulting Ltd
5  * Copyright 2009 Olly Betts
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License as
9  * published by the Free Software Foundation; either version 2 of the
10  * License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, see
19  * <https://www.gnu.org/licenses/>.
20  */
21 
22 #include <config.h>
23 
25 
26 #include "xapian/document.h"
27 
28 using namespace std;
29 
30 namespace Xapian {
31 
32 bool
33 ValueSetMatchDecider::operator()(const Xapian::Document& doc) const
34 {
35  return (testset.find(doc.get_value(valuenum)) == testset.end()) ^ inclusive;
36 }
37 
38 }
Class representing a document.
Definition: document.h:64
std::string get_value(Xapian::valueno slot) const
Read a value slot in this document.
Definition: document.cc:185
Class representing a document.
The Xapian namespace contains public interfaces for the Xapian library.
Definition: compactor.cc:82
MatchDecider subclass for filtering results by value.