24 #ifndef XAPIAN_INCLUDED_WEIGHT_H
25 #define XAPIAN_INCLUDED_WEIGHT_H
104 UNIQUE_TERMS_MIN = 1024,
114 UNIQUE_TERMS_MAX = 2048,
121 DB_DOC_LENGTH_MIN = 4096,
128 DB_DOC_LENGTH_MAX = 8192,
135 DB_UNIQUE_TERMS_MIN = 16384,
142 DB_UNIQUE_TERMS_MAX = 32768,
153 IS_BOOLWEIGHT_ =
static_cast<int>(0x80000000)
184 stats_needed =
stat_flags(stats_needed | flag);
196 virtual void init(
double factor) = 0;
321 virtual std::string
name()
const;
328 virtual std::string serialise()
const;
347 virtual Weight * unserialise(
const std::string & serialised)
const;
421 virtual double get_maxextra()
const;
476 return stats_needed & DOC_LENGTH;
485 return stats_needed & WDF;
495 return stats_needed & UNIQUE_TERMS;
508 static const Weight * create(
const std::string & scheme,
517 virtual Weight * create_from_parameters(
const char * params)
const;
524 return stats_needed & IS_BOOLWEIGHT_;
536 return stats_needed & WDF_DOC_MAX;
577 return doclength_upper_bound_;
587 return doclength_lower_bound_;
595 return wdf_upper_bound_;
600 return total_length_;
613 return unique_terms_upper_bound_;
624 return unique_terms_lower_bound_;
632 return db_doclength_upper_bound_;
642 return db_doclength_lower_bound_;
653 return db_unique_terms_upper_bound_;
662 return db_unique_terms_lower_bound_;
670 return db_wdf_upper_bound_;
681 void init(
double factor);
686 need_stat(IS_BOOLWEIGHT_);
689 std::string
name()
const;
691 std::string serialise()
const;
692 BoolWeight * unserialise(
const std::string & serialised)
const;
698 double get_maxpart()
const;
700 BoolWeight * create_from_parameters(
const char * params)
const;
839 INCREMENTED_GLOBAL_FREQ = 9,
845 SQRT_GLOBAL_FREQ = 10
878 void init(
double factor);
887 double get_idfn(
idf_norm idf_normalization)
const;
888 double get_wtn(
double wt,
wt_norm wt_normalization)
const;
988 TfIdfWeight(
const std::string &normalizations,
double slope,
double delta);
1004 :
TfIdfWeight(wdf_normalization, idf_normalization,
1005 wt_normalization, 0.2, 1.0) {}
1022 TfIdfWeight(wdf_norm wdf_norm_, idf_norm idf_norm_,
1023 wt_norm wt_norm_,
double slope,
double delta);
1028 wt_norm_(
wt_norm::
NONE), param_slope(0.2), param_delta(1.0)
1031 need_stat(TERMFREQ);
1034 need_stat(COLLECTION_SIZE);
1037 std::string
name()
const;
1039 std::string serialise()
const;
1040 TfIdfWeight * unserialise(
const std::string & serialised)
const;
1046 double get_maxpart()
const;
1048 TfIdfWeight * create_from_parameters(
const char * params)
const;
1068 void init(
double factor);
1098 BM25Weight(
double k1,
double k2,
double k3,
double b,
double min_normlen)
1099 : param_k1(k1), param_k2(k2), param_k3(k3), param_b(b),
1100 param_min_normlen(min_normlen)
1102 if (param_k1 < 0) param_k1 = 0;
1103 if (param_k2 < 0) param_k2 = 0;
1104 if (param_k3 < 0) param_k3 = 0;
1107 }
else if (param_b > 1) {
1110 need_stat(COLLECTION_SIZE);
1111 need_stat(RSET_SIZE);
1112 need_stat(TERMFREQ);
1113 need_stat(RELTERMFREQ);
1116 if (param_k2 != 0 || (param_k1 != 0 && param_b != 0)) {
1117 need_stat(DOC_LENGTH_MIN);
1118 need_stat(AVERAGE_LENGTH);
1120 if (param_k1 != 0 && param_b != 0) need_stat(DOC_LENGTH);
1121 if (param_k2 != 0) {
1122 need_stat(DOC_LENGTH);
1123 need_stat(QUERY_LENGTH);
1125 if (param_k3 != 0) need_stat(WQF);
1129 : param_k1(1), param_k2(0), param_k3(1), param_b(0.5),
1130 param_min_normlen(0.5)
1132 need_stat(COLLECTION_SIZE);
1133 need_stat(RSET_SIZE);
1134 need_stat(TERMFREQ);
1135 need_stat(RELTERMFREQ);
1138 need_stat(DOC_LENGTH_MIN);
1139 need_stat(AVERAGE_LENGTH);
1140 need_stat(DOC_LENGTH);
1144 std::string
name()
const;
1146 std::string serialise()
const;
1147 BM25Weight * unserialise(
const std::string & serialised)
const;
1153 double get_maxpart()
const;
1158 double get_maxextra()
const;
1160 BM25Weight * create_from_parameters(
const char * params)
const;
1182 void init(
double factor);
1220 double min_normlen,
double delta)
1221 : param_k1(k1), param_k2(k2), param_k3(k3), param_b(b),
1222 param_min_normlen(min_normlen), param_delta(delta)
1224 if (param_k1 < 0) param_k1 = 0;
1225 if (param_k2 < 0) param_k2 = 0;
1226 if (param_k3 < 0) param_k3 = 0;
1227 if (param_delta < 0) param_delta = 0;
1230 }
else if (param_b > 1) {
1233 need_stat(COLLECTION_SIZE);
1234 need_stat(RSET_SIZE);
1235 need_stat(TERMFREQ);
1236 need_stat(RELTERMFREQ);
1239 if (param_k2 != 0 || (param_k1 != 0 && param_b != 0)) {
1240 need_stat(DOC_LENGTH_MIN);
1241 need_stat(AVERAGE_LENGTH);
1243 if (param_k1 != 0 && param_b != 0) need_stat(DOC_LENGTH);
1244 if (param_k2 != 0) {
1245 need_stat(DOC_LENGTH);
1246 need_stat(QUERY_LENGTH);
1248 if (param_k3 != 0) need_stat(WQF);
1252 : param_k1(1), param_k2(0), param_k3(1), param_b(0.5),
1253 param_min_normlen(0.5), param_delta(1)
1255 need_stat(COLLECTION_SIZE);
1256 need_stat(RSET_SIZE);
1257 need_stat(TERMFREQ);
1258 need_stat(RELTERMFREQ);
1261 need_stat(DOC_LENGTH_MIN);
1262 need_stat(AVERAGE_LENGTH);
1263 need_stat(DOC_LENGTH);
1267 std::string
name()
const;
1269 std::string serialise()
const;
1270 BM25PlusWeight * unserialise(
const std::string & serialised)
const;
1276 double get_maxpart()
const;
1281 double get_maxextra()
const;
1283 BM25PlusWeight * create_from_parameters(
const char * params)
const;
1343 void init(
double factor);
1359 need_stat(AVERAGE_LENGTH);
1360 need_stat(DOC_LENGTH);
1361 need_stat(DOC_LENGTH_MIN);
1362 need_stat(DOC_LENGTH_MAX);
1363 need_stat(COLLECTION_SIZE);
1367 need_stat(TERMFREQ);
1370 std::string
name()
const;
1372 std::string serialise()
const;
1373 InL2Weight * unserialise(
const std::string & serialised)
const;
1379 double get_maxpart()
const;
1381 InL2Weight * create_from_parameters(
const char * params)
const;
1414 void init(
double factor);
1430 need_stat(AVERAGE_LENGTH);
1431 need_stat(DOC_LENGTH);
1432 need_stat(DOC_LENGTH_MIN);
1433 need_stat(DOC_LENGTH_MAX);
1434 need_stat(COLLECTION_SIZE);
1435 need_stat(COLLECTION_FREQ);
1439 need_stat(TERMFREQ);
1442 std::string
name()
const;
1444 std::string serialise()
const;
1445 IfB2Weight * unserialise(
const std::string & serialised)
const;
1451 double get_maxpart()
const;
1453 IfB2Weight * create_from_parameters(
const char * params)
const;
1486 void init(
double factor);
1500 need_stat(AVERAGE_LENGTH);
1501 need_stat(DOC_LENGTH);
1502 need_stat(DOC_LENGTH_MIN);
1503 need_stat(DOC_LENGTH_MAX);
1504 need_stat(COLLECTION_SIZE);
1508 need_stat(COLLECTION_FREQ);
1509 need_stat(TERMFREQ);
1512 std::string
name()
const;
1514 std::string serialise()
const;
1515 IneB2Weight * unserialise(
const std::string & serialised)
const;
1521 double get_maxpart()
const;
1523 IneB2Weight * create_from_parameters(
const char * params)
const;
1559 void init(
double factor);
1575 need_stat(AVERAGE_LENGTH);
1576 need_stat(DOC_LENGTH);
1577 need_stat(DOC_LENGTH_MIN);
1578 need_stat(DOC_LENGTH_MAX);
1579 need_stat(COLLECTION_SIZE);
1580 need_stat(COLLECTION_FREQ);
1584 need_stat(TERMFREQ);
1587 std::string
name()
const;
1589 std::string serialise()
const;
1590 BB2Weight * unserialise(
const std::string & serialised)
const;
1596 double get_maxpart()
const;
1598 BB2Weight * create_from_parameters(
const char * params)
const;
1628 void init(
double factor);
1632 need_stat(DOC_LENGTH);
1633 need_stat(COLLECTION_FREQ);
1637 need_stat(DOC_LENGTH_MIN);
1638 need_stat(DOC_LENGTH_MAX);
1639 need_stat(TOTAL_LENGTH);
1642 std::string
name()
const;
1644 std::string serialise()
const;
1645 DLHWeight * unserialise(
const std::string & serialised)
const;
1651 double get_maxpart()
const;
1653 DLHWeight * create_from_parameters(
const char * params)
const;
1692 void init(
double factor_);
1708 need_stat(AVERAGE_LENGTH);
1709 need_stat(DOC_LENGTH);
1710 need_stat(DOC_LENGTH_MIN);
1711 need_stat(DOC_LENGTH_MAX);
1712 need_stat(COLLECTION_SIZE);
1713 need_stat(COLLECTION_FREQ);
1719 std::string
name()
const;
1721 std::string serialise()
const;
1722 PL2Weight * unserialise(
const std::string & serialised)
const;
1728 double get_maxpart()
const;
1730 PL2Weight * create_from_parameters(
const char * params)
const;
1761 void init(
double factor_);
1784 : param_c(1.0), param_delta(0.8) {
1785 need_stat(AVERAGE_LENGTH);
1786 need_stat(DOC_LENGTH);
1787 need_stat(DOC_LENGTH_MIN);
1788 need_stat(DOC_LENGTH_MAX);
1789 need_stat(COLLECTION_SIZE);
1790 need_stat(COLLECTION_FREQ);
1796 std::string
name()
const;
1798 std::string serialise()
const;
1799 PL2PlusWeight * unserialise(
const std::string & serialised)
const;
1805 double get_maxpart()
const;
1807 PL2PlusWeight * create_from_parameters(
const char * params)
const;
1839 void init(
double factor);
1844 need_stat(DOC_LENGTH);
1845 need_stat(COLLECTION_FREQ);
1849 need_stat(DOC_LENGTH_MIN);
1850 need_stat(DOC_LENGTH_MAX);
1851 need_stat(TOTAL_LENGTH);
1854 std::string
name()
const;
1856 std::string serialise()
const;
1857 DPHWeight * unserialise(
const std::string & serialised)
const;
1863 double get_maxpart()
const;
1865 DPHWeight * create_from_parameters(
const char * params)
const;
1890 void init(
double factor_);
1911 explicit LMJMWeight(
double lambda = 0.0) : param_lambda(lambda) {
1913 need_stat(QUERY_LENGTH);
1914 need_stat(DOC_LENGTH);
1917 need_stat(COLLECTION_FREQ);
1918 need_stat(TOTAL_LENGTH);
1919 need_stat(DOC_LENGTH_MIN);
1927 double get_maxpart()
const;
1929 std::string
name()
const;
1931 std::string serialise()
const;
1932 LMJMWeight* unserialise(
const std::string& serialised)
const;
1934 LMJMWeight* create_from_parameters(
const char* params)
const;
1973 void init(
double factor_);
1985 : param_mu(mu), param_delta(delta) {
1987 need_stat(QUERY_LENGTH);
1988 need_stat(DOC_LENGTH);
1991 need_stat(COLLECTION_FREQ);
1992 need_stat(TOTAL_LENGTH);
1993 need_stat(DOC_LENGTH_MIN);
1994 need_stat(DOC_LENGTH_MAX);
2002 double get_maxpart()
const;
2008 double get_maxextra()
const;
2010 std::string
name()
const;
2012 std::string serialise()
const;
2046 void init(
double factor_);
2055 need_stat(QUERY_LENGTH);
2056 need_stat(DOC_LENGTH);
2059 need_stat(COLLECTION_FREQ);
2060 need_stat(TOTAL_LENGTH);
2061 need_stat(DOC_LENGTH_MIN);
2062 need_stat(UNIQUE_TERMS);
2063 need_stat(DOC_LENGTH_MAX);
2071 double get_maxpart()
const;
2077 double get_maxextra()
const;
2079 std::string
name()
const;
2081 std::string serialise()
const;
2118 void init(
double factor_);
2129 : param_lambda(lambda), param_mu(mu)
2132 need_stat(QUERY_LENGTH);
2133 need_stat(DOC_LENGTH);
2136 need_stat(COLLECTION_FREQ);
2137 need_stat(TOTAL_LENGTH);
2138 need_stat(DOC_LENGTH_MIN);
2139 need_stat(DOC_LENGTH_MAX);
2146 double get_maxpart()
const;
2151 double get_maxextra()
const;
2153 std::string
name()
const;
2155 std::string serialise()
const;
2156 LM2StageWeight* unserialise(
const std::string& serialised)
const;
2158 LM2StageWeight* create_from_parameters(
const char* params)
const;
2173 void init(
double factor_);
2178 std::string
name()
const;
2180 std::string serialise()
const;
2181 CoordWeight * unserialise(
const std::string & serialised)
const;
2187 double get_maxpart()
const;
2189 CoordWeight * create_from_parameters(
const char * params)
const;
2217 void init(
double factor);
2225 need_stat(QUERY_LENGTH);
2226 need_stat(UNIQUE_TERMS);
2227 need_stat(UNIQUE_TERMS_MIN);
2230 std::string
name()
const;
2232 std::string serialise()
const;
2233 DiceWeight* unserialise(
const std::string& serialised)
const;
2239 double get_maxpart()
const;
2241 DiceWeight* create_from_parameters(
const char* params)
const;
This class implements the BB2 weighting scheme.
double stirling_constant_2
double upper_bound
The upper bound on the weight.
double stirling_constant_1
double c_product_avlen
The constant values to be used in get_sumpart().
double param_c
The wdf normalization parameter in the formula.
Xapian::Weight subclass implementing the BM25+ probabilistic formula.
Xapian::doclength len_factor
Factor to multiply the document length by.
Xapian::doclength param_min_normlen
The minimum normalised document length value.
double param_delta
Additional parameter delta in the BM25+ formula.
double termweight
Factor combining all the document independent factors.
BM25PlusWeight(double k1, double k2, double k3, double b, double min_normlen, double delta)
Construct a BM25PlusWeight.
Xapian::Weight subclass implementing the BM25 probabilistic formula.
Xapian::doclength param_min_normlen
The minimum normalised document length value.
BM25Weight(double k1, double k2, double k3, double b, double min_normlen)
Construct a BM25Weight.
Xapian::doclength len_factor
Factor to multiply the document length by.
double termweight
Factor combining all the document independent factors.
Class implementing a "boolean" weighting scheme.
BoolWeight()
Construct a BoolWeight.
Xapian::Weight subclass implementing Coordinate Matching.
double factor
The factor to multiply weights by.
CoordWeight()
Construct a CoordWeight.
This class implements the DLH weighting scheme, which is a representative scheme of the Divergence fr...
double upper_bound
The upper bound on the weight.
double log_constant
The constant value to be used in get_sumpart().
double wqf_product_factor
This class implements the DPH weighting scheme.
double wqf_product_factor
DPHWeight()
Construct a DPHWeight.
double upper_bound
The upper bound on the weight.
double log_constant
The constant value used in get_sumpart() .
Virtual base class for Database internals.
Xapian::Weight subclass implementing Dice Coefficient.
double upper_bound
Upper bound on the weight.
double numerator
The numerator in the weight calculation.
DiceWeight()
Construct a DiceWeight.
This class implements the IfB2 weighting scheme.
double upper_bound
The upper bound on the weight.
double param_c
The wdf normalization parameter in the formula.
double wqf_product_idf
The constant values which are used for calculations in get_sumpart().
This class implements the InL2 weighting scheme.
double wqf_product_idf
The constant values which are used on every call to get_sumpart().
double param_c
The wdf normalization parameter in the formula.
double upper_bound
The upper bound on the weight a term can give to a document.
This class implements the IneB2 weighting scheme.
double upper_bound
The upper bound of the weight.
double param_c
The wdf normalization parameter in the formula.
double wqf_product_idf
Constant values used in get_sumpart().
Language Model weighting with Two Stage smoothing.
LM2StageWeight(double lambda=0.7, double mu=2000.0)
Construct a LM2StageWeight.
double factor
The factor to multiply weights by.
double multiplier
Precalculated multiplier for use in weight calculations.
double extra_offset
Precalculated offset to add to every sumextra.
double param_mu
Parameter controlling the smoothing.
double param_lambda
Parameter controlling the smoothing.
Language Model weighting with Absolute Discount smoothing.
double factor
The factor to multiply weights by.
double param_delta
Parameter controlling the smoothing.
LMAbsDiscountWeight(double delta=0.7)
Construct a LMAbsDiscountWeight.
double multiplier
Precalculated multiplier for use in weight calculations.
double extra_offset
Precalculated offset to add to every sumextra.
Language Model weighting with Dirichlet or Dir+ smoothing.
double param_delta
A pseudo TF value to control the scale of the TF lower bound.
double param_mu
Parameter controlling the smoothing.
double factor
The factor to multiply weights by.
double extra_offset
Precalculated offset to add to every sumextra.
LMDirichletWeight(double mu=2000.0, double delta=0.05)
Construct a LMDirichletWeight.
double multiplier
Precalculated multiplier for use in weight calculations.
Language Model weighting with Jelinek-Mercer smoothing.
LMJMWeight(double lambda=0.0)
Construct a LMJMWeight.
double multiplier
Precalculated multiplier for use in weight calculations.
double factor
The factor to multiply weights by.
double param_lambda
Parameter controlling the smoothing.
Xapian::Weight subclass implementing the PL2+ probabilistic formula.
double mean
Set by init() to get_collection_freq()) / get_collection_size()
double dw
Weight contribution of delta term in the PL2+ function.
double factor
The factor to multiply weights by.
double P1
Constants for a given term in a given query.
double param_c
The wdf normalization parameter in the formula.
double cl
Set by init() to (param_c * get_average_length())
double param_delta
Additional parameter delta in the PL2+ weighting formula.
double upper_bound
The upper bound on the weight.
This class implements the PL2 weighting scheme.
double upper_bound
The upper bound on the weight.
double param_c
The wdf normalization parameter in the formula.
double cl
Set by init() to (param_c * get_average_length())
double P1
Constants for a given term in a given query.
double factor
The factor to multiply weights by.
Registry for user subclasses.
Xapian::Weight subclass implementing the tf-idf weighting scheme.
double wqf_factor
The factor to multiply with the weight.
TfIdfWeight(const std::string &normalizations)
Construct a TfIdfWeight.
idf_norm
Idf normalizations.
wt_norm wt_norm_
The parameter for normalization for the document weight.
wdf_norm wdf_norm_
The parameter for normalization for the wdf.
wt_norm
Weight normalizations.
idf_norm idf_norm_
The parameter for normalization for the idf.
double idfn
Normalised IDF value (document-independent).
TfIdfWeight()
Construct a TfIdfWeight using the default normalizations ("ntn").
wdf_norm
Wdf normalizations.
TfIdfWeight(wdf_norm wdf_normalization, idf_norm idf_normalization, wt_norm wt_normalization)
Construct a TfIdfWeight.
Xapian::Weight subclass implementing the traditional probabilistic formula.
TradWeight(double k=1.0)
Construct a TradWeight.
Class to hold statistics for a given collection.
Abstract base class for weighting schemes.
Xapian::termcount unique_terms_upper_bound_
An upper bound on the number of unique terms in any document in the shard.
Xapian::termcount get_db_wdf_upper_bound() const
An upper bound on the wdf of this term in the database.
Xapian::termcount db_doclength_upper_bound_
An upper bound on the maximum length of any document in the database.
Xapian::termcount wqf_
The within-query-frequency of this term.
Xapian::termcount get_query_length() const
The length of the query.
bool get_sumpart_needs_wdfdocmax_() const
Xapian::termcount get_doclength_lower_bound() const
A lower bound on the minimum length of any document in the shard.
Xapian::doccount get_reltermfreq() const
The number of relevant documents which this term indexes.
Xapian::totallength total_length_
Total length of all documents in the collection.
void operator=(const Weight &)
Don't allow assignment.
Xapian::termcount db_wdf_upper_bound_
An upper bound on the wdf of this term in the database.
Xapian::doccount collection_size_
The number of documents in the collection.
Weight()
Default constructor, needed by subclass constructors.
Xapian::termcount query_length_
The length of the query.
Xapian::termcount get_db_unique_terms_upper_bound() const
A lower bound on the number of unique terms in any document in the database.
Xapian::doccount get_termfreq() const
The number of documents which this term indexes.
bool is_bool_weight_() const
virtual Weight * clone() const =0
Clone this object.
Xapian::doclength average_length_
The average length of a document in the collection.
Xapian::termcount doclength_upper_bound_
An upper bound on the maximum length of any document in the shard.
Xapian::doccount rset_size_
The number of documents marked as relevant.
bool get_sumpart_needs_wdf_() const
Xapian::totallength get_total_length() const
Total length of all documents in the collection.
Xapian::doccount reltermfreq_
The number of relevant documents which this term indexes.
Xapian::termcount wdf_upper_bound_
An upper bound on the wdf of this term in the shard.
Xapian::termcount get_db_doclength_lower_bound() const
A lower bound on the minimum length of any document in the database.
virtual void init(double factor)=0
Allow the subclass to perform any initialisation it needs to.
void need_stat(stat_flags flag)
Tell Xapian that your subclass will want a particular statistic.
virtual double get_maxpart() const =0
Return an upper bound on what get_sumpart() can return for any document.
Xapian::termcount get_db_unique_terms_lower_bound() const
An upper bound on the number of unique terms in any document in the database.
Xapian::doccount get_rset_size() const
The number of documents marked as relevant.
Xapian::termcount db_doclength_lower_bound_
A lower bound on the minimum length of any document in the database.
Xapian::doccount termfreq_
The number of documents which this term indexes.
Xapian::termcount get_unique_terms_lower_bound() const
An upper bound on the number of unique terms in any document in the shard.
Xapian::termcount get_wqf() const
The within-query-frequency of this term.
Xapian::termcount get_collection_freq() const
The collection frequency of the term.
Xapian::termcount collectionfreq_
Xapian::doccount get_collection_size() const
The number of documents in the collection.
Weight(const Weight &)
Don't allow copying.
Xapian::doclength get_average_length() const
The average length of a document in the collection.
Xapian::termcount get_unique_terms_upper_bound() const
A lower bound on the number of unique terms in any document in the shard.
Xapian::termcount db_unique_terms_upper_bound_
An upper bound on the number of unique terms in any document in the database.
bool get_sumpart_needs_uniqueterms_() const
Xapian::termcount get_doclength_upper_bound() const
An upper bound on the maximum length of any document in the shard.
stat_flags stats_needed
A bitmask of the statistics this weighting scheme needs.
Xapian::termcount get_db_doclength_upper_bound() const
An upper bound on the maximum length of any document in the database.
bool get_sumpart_needs_doclength_() const
Xapian::termcount doclength_lower_bound_
A lower bound on the minimum length of any document in the shard.
stat_flags
Stats which the weighting scheme can use (see need_stat()).
Xapian::termcount db_unique_terms_lower_bound_
A lower bound on the number of unique terms in any document in the database.
virtual double get_sumpart(Xapian::termcount wdf, Xapian::termcount doclen, Xapian::termcount uniqterms, Xapian::termcount wdfdocmax) const =0
Calculate the weight contribution for this object's term to a document.
Xapian::termcount unique_terms_lower_bound_
A lower bound on the number of unique terms in any document in the shard.
Xapian::termcount get_wdf_upper_bound() const
An upper bound on the wdf of this term in the shard.
An indexed database of documents.
Define XAPIAN_DEPRECATED() and related macros.
The Xapian namespace contains public interfaces for the Xapian library.
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
double doclength
A normalised document length.
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
XAPIAN_TOTALLENGTH_TYPE totallength
The total length of all documents in a database.
Class for looking up user subclasses during unserialisation.
Define XAPIAN_VISIBILITY_* macros.
#define XAPIAN_VISIBILITY_DEFAULT
#define XAPIAN_VISIBILITY_INTERNAL