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;
985 TfIdfWeight(
const std::string &normalizations,
double slope,
double delta);
1001 :
TfIdfWeight(wdf_normalization, idf_normalization,
1002 wt_normalization, 0.2, 1.0) {}
1019 TfIdfWeight(wdf_norm wdf_norm_, idf_norm idf_norm_,
1020 wt_norm wt_norm_,
double slope,
double delta);
1025 wt_norm_(
wt_norm::
NONE), param_slope(0.2), param_delta(1.0)
1028 need_stat(TERMFREQ);
1031 need_stat(COLLECTION_SIZE);
1034 std::string
name()
const;
1036 std::string serialise()
const;
1037 TfIdfWeight * unserialise(
const std::string & serialised)
const;
1043 double get_maxpart()
const;
1045 TfIdfWeight * create_from_parameters(
const char * params)
const;
1065 void init(
double factor);
1095 BM25Weight(
double k1,
double k2,
double k3,
double b,
double min_normlen)
1096 : param_k1(k1), param_k2(k2), param_k3(k3), param_b(b),
1097 param_min_normlen(min_normlen)
1099 if (param_k1 < 0) param_k1 = 0;
1100 if (param_k2 < 0) param_k2 = 0;
1101 if (param_k3 < 0) param_k3 = 0;
1104 }
else if (param_b > 1) {
1107 need_stat(COLLECTION_SIZE);
1108 need_stat(RSET_SIZE);
1109 need_stat(TERMFREQ);
1110 need_stat(RELTERMFREQ);
1113 if (param_k2 != 0 || (param_k1 != 0 && param_b != 0)) {
1114 need_stat(DOC_LENGTH_MIN);
1115 need_stat(AVERAGE_LENGTH);
1117 if (param_k1 != 0 && param_b != 0) need_stat(DOC_LENGTH);
1118 if (param_k2 != 0) {
1119 need_stat(DOC_LENGTH);
1120 need_stat(QUERY_LENGTH);
1122 if (param_k3 != 0) need_stat(WQF);
1126 : param_k1(1), param_k2(0), param_k3(1), param_b(0.5),
1127 param_min_normlen(0.5)
1129 need_stat(COLLECTION_SIZE);
1130 need_stat(RSET_SIZE);
1131 need_stat(TERMFREQ);
1132 need_stat(RELTERMFREQ);
1135 need_stat(DOC_LENGTH_MIN);
1136 need_stat(AVERAGE_LENGTH);
1137 need_stat(DOC_LENGTH);
1141 std::string
name()
const;
1143 std::string serialise()
const;
1144 BM25Weight * unserialise(
const std::string & serialised)
const;
1150 double get_maxpart()
const;
1155 double get_maxextra()
const;
1157 BM25Weight * create_from_parameters(
const char * params)
const;
1179 void init(
double factor);
1217 double min_normlen,
double delta)
1218 : param_k1(k1), param_k2(k2), param_k3(k3), param_b(b),
1219 param_min_normlen(min_normlen), param_delta(delta)
1221 if (param_k1 < 0) param_k1 = 0;
1222 if (param_k2 < 0) param_k2 = 0;
1223 if (param_k3 < 0) param_k3 = 0;
1224 if (param_delta < 0) param_delta = 0;
1227 }
else if (param_b > 1) {
1230 need_stat(COLLECTION_SIZE);
1231 need_stat(RSET_SIZE);
1232 need_stat(TERMFREQ);
1233 need_stat(RELTERMFREQ);
1236 if (param_k2 != 0 || (param_k1 != 0 && param_b != 0)) {
1237 need_stat(DOC_LENGTH_MIN);
1238 need_stat(AVERAGE_LENGTH);
1240 if (param_k1 != 0 && param_b != 0) need_stat(DOC_LENGTH);
1241 if (param_k2 != 0) {
1242 need_stat(DOC_LENGTH);
1243 need_stat(QUERY_LENGTH);
1245 if (param_k3 != 0) need_stat(WQF);
1249 : param_k1(1), param_k2(0), param_k3(1), param_b(0.5),
1250 param_min_normlen(0.5), param_delta(1)
1252 need_stat(COLLECTION_SIZE);
1253 need_stat(RSET_SIZE);
1254 need_stat(TERMFREQ);
1255 need_stat(RELTERMFREQ);
1258 need_stat(DOC_LENGTH_MIN);
1259 need_stat(AVERAGE_LENGTH);
1260 need_stat(DOC_LENGTH);
1264 std::string
name()
const;
1266 std::string serialise()
const;
1267 BM25PlusWeight * unserialise(
const std::string & serialised)
const;
1273 double get_maxpart()
const;
1278 double get_maxextra()
const;
1280 BM25PlusWeight * create_from_parameters(
const char * params)
const;
1340 void init(
double factor);
1356 need_stat(AVERAGE_LENGTH);
1357 need_stat(DOC_LENGTH);
1358 need_stat(DOC_LENGTH_MIN);
1359 need_stat(DOC_LENGTH_MAX);
1360 need_stat(COLLECTION_SIZE);
1364 need_stat(TERMFREQ);
1367 std::string
name()
const;
1369 std::string serialise()
const;
1370 InL2Weight * unserialise(
const std::string & serialised)
const;
1376 double get_maxpart()
const;
1378 InL2Weight * create_from_parameters(
const char * params)
const;
1411 void init(
double factor);
1427 need_stat(AVERAGE_LENGTH);
1428 need_stat(DOC_LENGTH);
1429 need_stat(DOC_LENGTH_MIN);
1430 need_stat(DOC_LENGTH_MAX);
1431 need_stat(COLLECTION_SIZE);
1432 need_stat(COLLECTION_FREQ);
1436 need_stat(TERMFREQ);
1439 std::string
name()
const;
1441 std::string serialise()
const;
1442 IfB2Weight * unserialise(
const std::string & serialised)
const;
1448 double get_maxpart()
const;
1450 IfB2Weight * create_from_parameters(
const char * params)
const;
1483 void init(
double factor);
1497 need_stat(AVERAGE_LENGTH);
1498 need_stat(DOC_LENGTH);
1499 need_stat(DOC_LENGTH_MIN);
1500 need_stat(DOC_LENGTH_MAX);
1501 need_stat(COLLECTION_SIZE);
1505 need_stat(COLLECTION_FREQ);
1506 need_stat(TERMFREQ);
1509 std::string
name()
const;
1511 std::string serialise()
const;
1512 IneB2Weight * unserialise(
const std::string & serialised)
const;
1518 double get_maxpart()
const;
1520 IneB2Weight * create_from_parameters(
const char * params)
const;
1556 void init(
double factor);
1572 need_stat(AVERAGE_LENGTH);
1573 need_stat(DOC_LENGTH);
1574 need_stat(DOC_LENGTH_MIN);
1575 need_stat(DOC_LENGTH_MAX);
1576 need_stat(COLLECTION_SIZE);
1577 need_stat(COLLECTION_FREQ);
1581 need_stat(TERMFREQ);
1584 std::string
name()
const;
1586 std::string serialise()
const;
1587 BB2Weight * unserialise(
const std::string & serialised)
const;
1593 double get_maxpart()
const;
1595 BB2Weight * create_from_parameters(
const char * params)
const;
1625 void init(
double factor);
1629 need_stat(DOC_LENGTH);
1630 need_stat(COLLECTION_FREQ);
1634 need_stat(DOC_LENGTH_MIN);
1635 need_stat(DOC_LENGTH_MAX);
1636 need_stat(TOTAL_LENGTH);
1639 std::string
name()
const;
1641 std::string serialise()
const;
1642 DLHWeight * unserialise(
const std::string & serialised)
const;
1648 double get_maxpart()
const;
1650 DLHWeight * create_from_parameters(
const char * params)
const;
1689 void init(
double factor_);
1705 need_stat(AVERAGE_LENGTH);
1706 need_stat(DOC_LENGTH);
1707 need_stat(DOC_LENGTH_MIN);
1708 need_stat(DOC_LENGTH_MAX);
1709 need_stat(COLLECTION_SIZE);
1710 need_stat(COLLECTION_FREQ);
1716 std::string
name()
const;
1718 std::string serialise()
const;
1719 PL2Weight * unserialise(
const std::string & serialised)
const;
1725 double get_maxpart()
const;
1727 PL2Weight * create_from_parameters(
const char * params)
const;
1758 void init(
double factor_);
1781 : param_c(1.0), param_delta(0.8) {
1782 need_stat(AVERAGE_LENGTH);
1783 need_stat(DOC_LENGTH);
1784 need_stat(DOC_LENGTH_MIN);
1785 need_stat(DOC_LENGTH_MAX);
1786 need_stat(COLLECTION_SIZE);
1787 need_stat(COLLECTION_FREQ);
1793 std::string
name()
const;
1795 std::string serialise()
const;
1796 PL2PlusWeight * unserialise(
const std::string & serialised)
const;
1802 double get_maxpart()
const;
1804 PL2PlusWeight * create_from_parameters(
const char * params)
const;
1836 void init(
double factor);
1841 need_stat(DOC_LENGTH);
1842 need_stat(COLLECTION_FREQ);
1846 need_stat(DOC_LENGTH_MIN);
1847 need_stat(DOC_LENGTH_MAX);
1848 need_stat(TOTAL_LENGTH);
1851 std::string
name()
const;
1853 std::string serialise()
const;
1854 DPHWeight * unserialise(
const std::string & serialised)
const;
1860 double get_maxpart()
const;
1862 DPHWeight * create_from_parameters(
const char * params)
const;
1887 void init(
double factor_);
1908 explicit LMJMWeight(
double lambda = 0.0) : param_lambda(lambda) {
1910 need_stat(QUERY_LENGTH);
1911 need_stat(DOC_LENGTH);
1914 need_stat(COLLECTION_FREQ);
1915 need_stat(TOTAL_LENGTH);
1916 need_stat(DOC_LENGTH_MIN);
1924 double get_maxpart()
const;
1926 std::string
name()
const;
1928 std::string serialise()
const;
1929 LMJMWeight* unserialise(
const std::string& serialised)
const;
1931 LMJMWeight* create_from_parameters(
const char* params)
const;
1970 void init(
double factor_);
1982 : param_mu(mu), param_delta(delta) {
1984 need_stat(QUERY_LENGTH);
1985 need_stat(DOC_LENGTH);
1988 need_stat(COLLECTION_FREQ);
1989 need_stat(TOTAL_LENGTH);
1990 need_stat(DOC_LENGTH_MIN);
1991 need_stat(DOC_LENGTH_MAX);
1999 double get_maxpart()
const;
2005 double get_maxextra()
const;
2007 std::string
name()
const;
2009 std::string serialise()
const;
2043 void init(
double factor_);
2052 need_stat(QUERY_LENGTH);
2053 need_stat(DOC_LENGTH);
2056 need_stat(COLLECTION_FREQ);
2057 need_stat(TOTAL_LENGTH);
2058 need_stat(DOC_LENGTH_MIN);
2059 need_stat(UNIQUE_TERMS);
2060 need_stat(DOC_LENGTH_MAX);
2068 double get_maxpart()
const;
2074 double get_maxextra()
const;
2076 std::string
name()
const;
2078 std::string serialise()
const;
2115 void init(
double factor_);
2126 : param_lambda(lambda), param_mu(mu)
2129 need_stat(QUERY_LENGTH);
2130 need_stat(DOC_LENGTH);
2133 need_stat(COLLECTION_FREQ);
2134 need_stat(TOTAL_LENGTH);
2135 need_stat(DOC_LENGTH_MIN);
2136 need_stat(DOC_LENGTH_MAX);
2143 double get_maxpart()
const;
2148 double get_maxextra()
const;
2150 std::string
name()
const;
2152 std::string serialise()
const;
2153 LM2StageWeight* unserialise(
const std::string& serialised)
const;
2155 LM2StageWeight* create_from_parameters(
const char* params)
const;
2170 void init(
double factor_);
2175 std::string
name()
const;
2177 std::string serialise()
const;
2178 CoordWeight * unserialise(
const std::string & serialised)
const;
2184 double get_maxpart()
const;
2186 CoordWeight * create_from_parameters(
const char * params)
const;
2214 void init(
double factor);
2222 need_stat(QUERY_LENGTH);
2223 need_stat(UNIQUE_TERMS);
2224 need_stat(UNIQUE_TERMS_MIN);
2227 std::string
name()
const;
2229 std::string serialise()
const;
2230 DiceWeight* unserialise(
const std::string& serialised)
const;
2236 double get_maxpart()
const;
2238 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