xapian-core  2.0.0
valuestats.h
Go to the documentation of this file.
1 
4 /* Copyright 2008 Lemur Consulting Ltd
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of the
9  * License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, see
18  * <https://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef XAPIAN_INCLUDED_VALUESTATS_H
22 #define XAPIAN_INCLUDED_VALUESTATS_H
23 
24 #include <string>
25 #include "xapian/types.h"
26 
28 struct ValueStats {
33 
36  std::string lower_bound;
37 
40  std::string upper_bound;
41 
43  ValueStats() { }
44 
47  void clear() {
48  freq = 0;
49  lower_bound.resize(0);
50  upper_bound.resize(0);
51  }
52 };
53 
54 #endif /* XAPIAN_INCLUDED_VALUESTATS_H */
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
Definition: types.h:37
Class to hold statistics for a given slot.
Definition: valuestats.h:28
std::string lower_bound
A lower bound on the values stored in the given value slot.
Definition: valuestats.h:36
std::string upper_bound
An upper bound on the values stored in the given value slot.
Definition: valuestats.h:40
void clear()
Clear the statistics.
Definition: valuestats.h:47
Xapian::doccount freq
The number of documents which have a (non-empty) value stored in the slot.
Definition: valuestats.h:32
ValueStats()
Construct an empty ValueStats object.
Definition: valuestats.h:43
typedefs for Xapian