| 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 2 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
| 3 |
<head> |
| 4 |
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| 5 |
<meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| 6 |
<meta name="generator" content="Doxygen 1.15.0"/> |
| 7 |
<meta name="viewport" content="width=device-width, initial-scale=1"/> |
| 8 |
<title>Xapian: API Documentation: Xapian::LatLongDistancePostingSource Class Reference</title> |
| 9 |
<link href="tabs.css" rel="stylesheet" type="text/css"/> |
| 10 |
<script type="text/javascript" src="jquery.js"></script> |
| 11 |
<script type="text/javascript" src="dynsections.js"></script> |
| 12 |
<link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| 13 |
</head> |
| 14 |
<body> |
| 15 |
<div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| 16 |
<div id="titlearea"> |
| 17 |
<table cellspacing="0" cellpadding="0"> |
| 18 |
<tbody> |
| 19 |
<tr style="height: 56px;"> |
| 20 |
<td id="projectalign" style="padding-left: 0.5em;"> |
| 21 |
<div id="projectname">xapian-core |
| 22 |
 <span id="projectnumber">1.4.31</span> |
| 23 |
</div> |
| 24 |
</td> |
| 25 |
</tr> |
| 26 |
</tbody> |
| 27 |
</table> |
| 28 |
</div> |
| 29 |
<!-- end header part --> |
| 30 |
<!-- Generated by Doxygen 1.15.0 --> |
| 31 |
<script type="text/javascript"> |
| 32 |
$(function() { codefold.init(); }); |
| 33 |
</script> |
| 34 |
<script type="text/javascript" src="menudata.js"></script> |
| 35 |
<script type="text/javascript" src="menu.js"></script> |
| 36 |
<script type="text/javascript"> |
| 37 |
$(function() { |
| 38 |
initMenu('',false,false,'search.php','Search',false); |
| 39 |
}); |
| 40 |
</script> |
| 41 |
<div id="main-nav"></div> |
| 42 |
<div id="nav-path" class="navpath"> |
| 43 |
<ul> |
| 44 |
<li class="navelem"><a href="namespaceXapian.html">Xapian</a></li><li class="navelem"><a href="classXapian_1_1LatLongDistancePostingSource.html">LatLongDistancePostingSource</a></li> </ul> |
| 45 |
</div> |
| 46 |
</div><!-- top --> |
| 47 |
<div id="doc-content"> |
| 48 |
<div class="header"> |
| 49 |
<div class="summary"> |
| 50 |
<a href="#pub-methods">Public Member Functions</a> | |
| 51 |
<a href="classXapian_1_1LatLongDistancePostingSource-members.html">List of all members</a> </div> |
| 52 |
<div class="headertitle"><div class="title">Xapian::LatLongDistancePostingSource Class Reference</div></div> |
| 53 |
</div><!--header--> |
| 54 |
<div class="contents"> |
| 55 |
|
| 56 |
<p>Posting source which returns a weight based on geospatial distance. |
| 57 |
<a href="#details">More...</a></p> |
| 58 |
|
| 59 |
<p><code>#include <geospatial.h></code></p> |
| 60 |
<div id="dynsection-0" onclick="return dynsection.toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;"><span class="dynarrow"><span class="arrowhead closed"></span></span>Inheritance diagram for Xapian::LatLongDistancePostingSource:</div> |
| 61 |
<div id="dynsection-0-summary" class="dynsummary" style="display:block;"> |
| 62 |
</div> |
| 63 |
<div id="dynsection-0-content" class="dyncontent" style="display:none;"> |
| 64 |
<div class="center"><img src="classXapian_1_1LatLongDistancePostingSource__inherit__graph.png" border="0" usemap="#aXapian_1_1LatLongDistancePostingSource_inherit__map" loading="lazy" alt="Inheritance graph"/></div> |
| 65 |
<map name="aXapian_1_1LatLongDistancePostingSource_inherit__map" id="aXapian_1_1LatLongDistancePostingSource_inherit__map"> |
| 66 |
<area shape="rect" title="Posting source which returns a weight based on geospatial distance." alt="" coords="5,249,236,294"/> |
| 67 |
<area shape="rect" href="classXapian_1_1ValuePostingSource.html" title="A posting source which generates weights from a value slot." alt="" coords="19,174,222,201"/> |
| 68 |
<area shape="poly" title=" " alt="" coords="122,215,123,250,118,248,119,219"/> |
| 69 |
<area shape="rect" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings." alt="" coords="37,98,204,126"/> |
| 70 |
<area shape="poly" title=" " alt="" coords="122,139,123,174,118,172,119,144"/> |
| 71 |
<area shape="rect" title=" " alt="" coords="44,5,197,50"/> |
| 72 |
<area shape="poly" title=" " alt="" coords="121,63,123,98,118,97,120,68"/> |
| 73 |
</map> |
| 74 |
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> |
| 75 |
<table class="memberdecls"> |
| 76 |
<tr class="heading"><td colspan="2"><h2 id="header-pub-methods" class="groupheader"><a id="pub-methods" name="pub-methods"></a> |
| 77 |
Public Member Functions</h2></td></tr> |
| 78 |
<tr class="memitem:a4659a2d806060f7cb37d12a94cc1ef3b" id="r_a4659a2d806060f7cb37d12a94cc1ef3b"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#a4659a2d806060f7cb37d12a94cc1ef3b">LatLongDistancePostingSource</a> (<a class="el" href="namespaceXapian.html#a94a899651fa920c72ffa9635bde630ea">Xapian::valueno</a> slot_, const <a class="el" href="classXapian_1_1LatLongCoords.html">LatLongCoords</a> &centre_, const <a class="el" href="classXapian_1_1LatLongMetric.html">LatLongMetric</a> &metric_, double max_range_=0.0, double k1_=1000.0, double k2_=1.0)</td></tr> |
| 79 |
<tr class="memdesc:a4659a2d806060f7cb37d12a94cc1ef3b"><td class="mdescLeft"> </td><td class="mdescRight">Construct a new posting source which returns only documents within range of one of the central coordinates. <br /></td></tr> |
| 80 |
<tr class="memitem:af7a0bc39e32604f93928d9708817f824" id="r_af7a0bc39e32604f93928d9708817f824"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#af7a0bc39e32604f93928d9708817f824">LatLongDistancePostingSource</a> (<a class="el" href="namespaceXapian.html#a94a899651fa920c72ffa9635bde630ea">Xapian::valueno</a> slot_, const <a class="el" href="classXapian_1_1LatLongCoords.html">LatLongCoords</a> &centre_, double max_range_=0.0, double k1_=1000.0, double k2_=1.0)</td></tr> |
| 81 |
<tr class="memdesc:af7a0bc39e32604f93928d9708817f824"><td class="mdescLeft"> </td><td class="mdescRight">Construct a new posting source which returns only documents within range of one of the central coordinates. <br /></td></tr> |
| 82 |
<tr class="memitem:a563dd69bf4113b73aa12335c3e282ae5" id="r_a563dd69bf4113b73aa12335c3e282ae5"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a563dd69bf4113b73aa12335c3e282ae5">next</a> (double min_wt)</td></tr> |
| 83 |
<tr class="memdesc:a563dd69bf4113b73aa12335c3e282ae5"><td class="mdescLeft"> </td><td class="mdescRight">Advance the current position to the next matching document. <br /></td></tr> |
| 84 |
<tr class="memitem:a85e5437efbd9b9e016bc3cd12b41b0db" id="r_a85e5437efbd9b9e016bc3cd12b41b0db"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a85e5437efbd9b9e016bc3cd12b41b0db">skip_to</a> (<a class="el" href="namespaceXapian.html#ad8f7a78bc920532b7d2baa3281b33e2f">Xapian::docid</a> min_docid, double min_wt)</td></tr> |
| 85 |
<tr class="memdesc:a85e5437efbd9b9e016bc3cd12b41b0db"><td class="mdescLeft"> </td><td class="mdescRight">Advance to the specified docid. <br /></td></tr> |
| 86 |
<tr class="memitem:a89b0848c6423fa83ed22f43652e79077" id="r_a89b0848c6423fa83ed22f43652e79077"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#a89b0848c6423fa83ed22f43652e79077">check</a> (<a class="el" href="namespaceXapian.html#ad8f7a78bc920532b7d2baa3281b33e2f">Xapian::docid</a> min_docid, double min_wt)</td></tr> |
| 87 |
<tr class="memdesc:a89b0848c6423fa83ed22f43652e79077"><td class="mdescLeft"> </td><td class="mdescRight">Check if the specified docid occurs. <br /></td></tr> |
| 88 |
<tr class="memitem:a7fecce9dea6df827943c379caa2d0cd2" id="r_a7fecce9dea6df827943c379caa2d0cd2"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="#a7fecce9dea6df827943c379caa2d0cd2">get_weight</a> () const</td></tr> |
| 89 |
<tr class="memdesc:a7fecce9dea6df827943c379caa2d0cd2"><td class="mdescLeft"> </td><td class="mdescRight">Return the weight contribution for the current document. <br /></td></tr> |
| 90 |
<tr class="memitem:a1d05a87e0672376a1cbd160c26f341a9" id="r_a1d05a87e0672376a1cbd160c26f341a9"><td class="memItemLeft" align="right" valign="top">LatLongDistancePostingSource * </td><td class="memItemRight" valign="bottom"><a class="el" href="#a1d05a87e0672376a1cbd160c26f341a9">clone</a> () const</td></tr> |
| 91 |
<tr class="memdesc:a1d05a87e0672376a1cbd160c26f341a9"><td class="mdescLeft"> </td><td class="mdescRight">Clone the posting source. <br /></td></tr> |
| 92 |
<tr class="memitem:a4ad81327348feeb9b68c3e37d26f45c7" id="r_a4ad81327348feeb9b68c3e37d26f45c7"><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="#a4ad81327348feeb9b68c3e37d26f45c7">name</a> () const</td></tr> |
| 93 |
<tr class="memdesc:a4ad81327348feeb9b68c3e37d26f45c7"><td class="mdescLeft"> </td><td class="mdescRight">Name of the posting source class. <br /></td></tr> |
| 94 |
<tr class="memitem:a7c3687449188ea137dec58065906fc0f" id="r_a7c3687449188ea137dec58065906fc0f"><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="#a7c3687449188ea137dec58065906fc0f">serialise</a> () const</td></tr> |
| 95 |
<tr class="memdesc:a7c3687449188ea137dec58065906fc0f"><td class="mdescLeft"> </td><td class="mdescRight">Serialise object parameters into a string. <br /></td></tr> |
| 96 |
<tr class="memitem:aa2f9978d2f71b3d5cadf395344dde790" id="r_aa2f9978d2f71b3d5cadf395344dde790"><td class="memItemLeft" align="right" valign="top">LatLongDistancePostingSource * </td><td class="memItemRight" valign="bottom"><a class="el" href="#aa2f9978d2f71b3d5cadf395344dde790">unserialise_with_registry</a> (const std::string &serialised, const <a class="el" href="classXapian_1_1Registry.html">Registry</a> &registry) const</td></tr> |
| 97 |
<tr class="memdesc:aa2f9978d2f71b3d5cadf395344dde790"><td class="mdescLeft"> </td><td class="mdescRight">Create object given string serialisation returned by <a class="el" href="#a7c3687449188ea137dec58065906fc0f" title="Serialise object parameters into a string.">serialise()</a>. <br /></td></tr> |
| 98 |
<tr class="memitem:ac3bb27d2891a9f3a8a2ceee0eaa0e747" id="r_ac3bb27d2891a9f3a8a2ceee0eaa0e747"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#ac3bb27d2891a9f3a8a2ceee0eaa0e747">init</a> (const <a class="el" href="classXapian_1_1Database.html">Database</a> &db_)</td></tr> |
| 99 |
<tr class="memdesc:ac3bb27d2891a9f3a8a2ceee0eaa0e747"><td class="mdescLeft"> </td><td class="mdescRight">Set this <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> to the start of the list of postings. <br /></td></tr> |
| 100 |
<tr class="memitem:a6f7e0a9442cd671295abbb69f5c4ad13" id="r_a6f7e0a9442cd671295abbb69f5c4ad13"><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="#a6f7e0a9442cd671295abbb69f5c4ad13">get_description</a> () const</td></tr> |
| 101 |
<tr class="memdesc:a6f7e0a9442cd671295abbb69f5c4ad13"><td class="mdescLeft"> </td><td class="mdescRight">Return a string describing this object. <br /></td></tr> |
| 102 |
<tr class="inherit_header pub_methods_classXapian_1_1ValuePostingSource"><td colspan="2" onclick="javascript:dynsection.toggleInherit('pub_methods_classXapian_1_1ValuePostingSource')"><span class="dynarrow"><span class="arrowhead closed"></span></span>Public Member Functions inherited from <a class="el" href="classXapian_1_1ValuePostingSource.html">Xapian::ValuePostingSource</a></td></tr> |
| 103 |
<tr class="memitem:accbffc6b7f573e9a41fc234a410a1ec3 inherit pub_methods_classXapian_1_1ValuePostingSource" id="r_accbffc6b7f573e9a41fc234a410a1ec3"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#accbffc6b7f573e9a41fc234a410a1ec3">ValuePostingSource</a> (<a class="el" href="namespaceXapian.html#a94a899651fa920c72ffa9635bde630ea">Xapian::valueno</a> slot_)</td></tr> |
| 104 |
<tr class="memdesc:accbffc6b7f573e9a41fc234a410a1ec3 inherit pub_methods_classXapian_1_1ValuePostingSource"><td class="mdescLeft"> </td><td class="mdescRight">Construct a <a class="el" href="classXapian_1_1ValuePostingSource.html" title="A posting source which generates weights from a value slot.">ValuePostingSource</a>. <br /></td></tr> |
| 105 |
<tr class="memitem:aa952a93fa1c80f8f8ee5b7e59b87d147 inherit pub_methods_classXapian_1_1ValuePostingSource" id="r_aa952a93fa1c80f8f8ee5b7e59b87d147"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceXapian.html#a9bbd62a8e56ea4619e4e59afb32aced6">Xapian::doccount</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#aa952a93fa1c80f8f8ee5b7e59b87d147">get_termfreq_min</a> () const</td></tr> |
| 106 |
<tr class="memdesc:aa952a93fa1c80f8f8ee5b7e59b87d147 inherit pub_methods_classXapian_1_1ValuePostingSource"><td class="mdescLeft"> </td><td class="mdescRight">A lower bound on the number of documents this object can return. <br /></td></tr> |
| 107 |
<tr class="memitem:a518d58643220e417e9affda5170b1096 inherit pub_methods_classXapian_1_1ValuePostingSource" id="r_a518d58643220e417e9affda5170b1096"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceXapian.html#a9bbd62a8e56ea4619e4e59afb32aced6">Xapian::doccount</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#a518d58643220e417e9affda5170b1096">get_termfreq_est</a> () const</td></tr> |
| 108 |
<tr class="memdesc:a518d58643220e417e9affda5170b1096 inherit pub_methods_classXapian_1_1ValuePostingSource"><td class="mdescLeft"> </td><td class="mdescRight">An estimate of the number of documents this object can return. <br /></td></tr> |
| 109 |
<tr class="memitem:a5264a143aef0e447260adc70ce225a43 inherit pub_methods_classXapian_1_1ValuePostingSource" id="r_a5264a143aef0e447260adc70ce225a43"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceXapian.html#a9bbd62a8e56ea4619e4e59afb32aced6">Xapian::doccount</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#a5264a143aef0e447260adc70ce225a43">get_termfreq_max</a> () const</td></tr> |
| 110 |
<tr class="memdesc:a5264a143aef0e447260adc70ce225a43 inherit pub_methods_classXapian_1_1ValuePostingSource"><td class="mdescLeft"> </td><td class="mdescRight">An upper bound on the number of documents this object can return. <br /></td></tr> |
| 111 |
<tr class="memitem:a560f89bad687164dd139f9025d2bb1db inherit pub_methods_classXapian_1_1ValuePostingSource" id="r_a560f89bad687164dd139f9025d2bb1db"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#a560f89bad687164dd139f9025d2bb1db">next</a> (double min_wt)</td></tr> |
| 112 |
<tr class="memdesc:a560f89bad687164dd139f9025d2bb1db inherit pub_methods_classXapian_1_1ValuePostingSource"><td class="mdescLeft"> </td><td class="mdescRight">Advance the current position to the next matching document. <br /></td></tr> |
| 113 |
<tr class="memitem:a27b5b12089a98975ad29bbcd0922556e inherit pub_methods_classXapian_1_1ValuePostingSource" id="r_a27b5b12089a98975ad29bbcd0922556e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#a27b5b12089a98975ad29bbcd0922556e">skip_to</a> (<a class="el" href="namespaceXapian.html#ad8f7a78bc920532b7d2baa3281b33e2f">Xapian::docid</a> min_docid, double min_wt)</td></tr> |
| 114 |
<tr class="memdesc:a27b5b12089a98975ad29bbcd0922556e inherit pub_methods_classXapian_1_1ValuePostingSource"><td class="mdescLeft"> </td><td class="mdescRight">Advance to the specified docid. <br /></td></tr> |
| 115 |
<tr class="memitem:ab222fd63a80cb7c329b8ab4cc27405b8 inherit pub_methods_classXapian_1_1ValuePostingSource" id="r_ab222fd63a80cb7c329b8ab4cc27405b8"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#ab222fd63a80cb7c329b8ab4cc27405b8">check</a> (<a class="el" href="namespaceXapian.html#ad8f7a78bc920532b7d2baa3281b33e2f">Xapian::docid</a> min_docid, double min_wt)</td></tr> |
| 116 |
<tr class="memdesc:ab222fd63a80cb7c329b8ab4cc27405b8 inherit pub_methods_classXapian_1_1ValuePostingSource"><td class="mdescLeft"> </td><td class="mdescRight">Check if the specified docid occurs. <br /></td></tr> |
| 117 |
<tr class="memitem:a53d851ba1e75670c28c9508921273dc0 inherit pub_methods_classXapian_1_1ValuePostingSource" id="r_a53d851ba1e75670c28c9508921273dc0"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#a53d851ba1e75670c28c9508921273dc0">at_end</a> () const</td></tr> |
| 118 |
<tr class="memdesc:a53d851ba1e75670c28c9508921273dc0 inherit pub_methods_classXapian_1_1ValuePostingSource"><td class="mdescLeft"> </td><td class="mdescRight">Return true if the current position is past the last entry in this list. <br /></td></tr> |
| 119 |
<tr class="memitem:ad9a4ca847b1a444a42f76ac7b1c27752 inherit pub_methods_classXapian_1_1ValuePostingSource" id="r_ad9a4ca847b1a444a42f76ac7b1c27752"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceXapian.html#ad8f7a78bc920532b7d2baa3281b33e2f">Xapian::docid</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#ad9a4ca847b1a444a42f76ac7b1c27752">get_docid</a> () const</td></tr> |
| 120 |
<tr class="memdesc:ad9a4ca847b1a444a42f76ac7b1c27752 inherit pub_methods_classXapian_1_1ValuePostingSource"><td class="mdescLeft"> </td><td class="mdescRight">Return the current docid. <br /></td></tr> |
| 121 |
<tr class="memitem:a764328b2a7085e24393a94eb1d2b91e0 inherit pub_methods_classXapian_1_1ValuePostingSource" id="r_a764328b2a7085e24393a94eb1d2b91e0"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#a764328b2a7085e24393a94eb1d2b91e0">init</a> (const <a class="el" href="classXapian_1_1Database.html">Database</a> &db_)</td></tr> |
| 122 |
<tr class="memdesc:a764328b2a7085e24393a94eb1d2b91e0 inherit pub_methods_classXapian_1_1ValuePostingSource"><td class="mdescLeft"> </td><td class="mdescRight">Set this <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> to the start of the list of postings. <br /></td></tr> |
| 123 |
<tr class="memitem:a6d4b124a53e83bfd2bcd3a5322273f57 inherit pub_methods_classXapian_1_1ValuePostingSource" id="r_a6d4b124a53e83bfd2bcd3a5322273f57"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classXapian_1_1Database.html">Xapian::Database</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#a6d4b124a53e83bfd2bcd3a5322273f57">get_database</a> () const</td></tr> |
| 124 |
<tr class="memdesc:a6d4b124a53e83bfd2bcd3a5322273f57 inherit pub_methods_classXapian_1_1ValuePostingSource"><td class="mdescLeft"> </td><td class="mdescRight">The database we're reading values from. <br /></td></tr> |
| 125 |
<tr class="memitem:ae5245e693baae3871fc289af32637f15 inherit pub_methods_classXapian_1_1ValuePostingSource" id="r_ae5245e693baae3871fc289af32637f15"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceXapian.html#a94a899651fa920c72ffa9635bde630ea">Xapian::valueno</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#ae5245e693baae3871fc289af32637f15">get_slot</a> () const</td></tr> |
| 126 |
<tr class="memdesc:ae5245e693baae3871fc289af32637f15 inherit pub_methods_classXapian_1_1ValuePostingSource"><td class="mdescLeft"> </td><td class="mdescRight">The slot we're reading values from. <br /></td></tr> |
| 127 |
<tr class="memitem:ad64852538c6a36e3099ff75fe8d74ab3 inherit pub_methods_classXapian_1_1ValuePostingSource" id="r_ad64852538c6a36e3099ff75fe8d74ab3"><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#ad64852538c6a36e3099ff75fe8d74ab3">get_value</a> () const</td></tr> |
| 128 |
<tr class="memdesc:ad64852538c6a36e3099ff75fe8d74ab3 inherit pub_methods_classXapian_1_1ValuePostingSource"><td class="mdescLeft"> </td><td class="mdescRight">Read current value. <br /></td></tr> |
| 129 |
<tr class="memitem:aeae75a9b595b361b3e6c28be23048014 inherit pub_methods_classXapian_1_1ValuePostingSource" id="r_aeae75a9b595b361b3e6c28be23048014"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#aeae75a9b595b361b3e6c28be23048014">done</a> ()</td></tr> |
| 130 |
<tr class="memdesc:aeae75a9b595b361b3e6c28be23048014 inherit pub_methods_classXapian_1_1ValuePostingSource"><td class="mdescLeft"> </td><td class="mdescRight">End the iteration. <br /></td></tr> |
| 131 |
<tr class="memitem:a8bb798e2c4cbc9184befb750410e7398 inherit pub_methods_classXapian_1_1ValuePostingSource" id="r_a8bb798e2c4cbc9184befb750410e7398"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#a8bb798e2c4cbc9184befb750410e7398">get_started</a> () const</td></tr> |
| 132 |
<tr class="memdesc:a8bb798e2c4cbc9184befb750410e7398 inherit pub_methods_classXapian_1_1ValuePostingSource"><td class="mdescLeft"> </td><td class="mdescRight">Flag indicating if we've started (true if we have). <br /></td></tr> |
| 133 |
<tr class="memitem:a32e275c815ab07a5e2c2fb02da9f1928 inherit pub_methods_classXapian_1_1ValuePostingSource" id="r_a32e275c815ab07a5e2c2fb02da9f1928"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#a32e275c815ab07a5e2c2fb02da9f1928">set_termfreq_min</a> (<a class="el" href="namespaceXapian.html#a9bbd62a8e56ea4619e4e59afb32aced6">Xapian::doccount</a> termfreq_min_)</td></tr> |
| 134 |
<tr class="memdesc:a32e275c815ab07a5e2c2fb02da9f1928 inherit pub_methods_classXapian_1_1ValuePostingSource"><td class="mdescLeft"> </td><td class="mdescRight">Set a lower bound on the term frequency. <br /></td></tr> |
| 135 |
<tr class="memitem:a7851aeed5774dbdd6b5692828730e3fc inherit pub_methods_classXapian_1_1ValuePostingSource" id="r_a7851aeed5774dbdd6b5692828730e3fc"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#a7851aeed5774dbdd6b5692828730e3fc">set_termfreq_est</a> (<a class="el" href="namespaceXapian.html#a9bbd62a8e56ea4619e4e59afb32aced6">Xapian::doccount</a> termfreq_est_)</td></tr> |
| 136 |
<tr class="memdesc:a7851aeed5774dbdd6b5692828730e3fc inherit pub_methods_classXapian_1_1ValuePostingSource"><td class="mdescLeft"> </td><td class="mdescRight">An estimate of the term frequency. <br /></td></tr> |
| 137 |
<tr class="memitem:acfdc1178868ae3600c3aeb291c450b32 inherit pub_methods_classXapian_1_1ValuePostingSource" id="r_acfdc1178868ae3600c3aeb291c450b32"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#acfdc1178868ae3600c3aeb291c450b32">set_termfreq_max</a> (<a class="el" href="namespaceXapian.html#a9bbd62a8e56ea4619e4e59afb32aced6">Xapian::doccount</a> termfreq_max_)</td></tr> |
| 138 |
<tr class="memdesc:acfdc1178868ae3600c3aeb291c450b32 inherit pub_methods_classXapian_1_1ValuePostingSource"><td class="mdescLeft"> </td><td class="mdescRight">An upper bound on the term frequency. <br /></td></tr> |
| 139 |
<tr class="inherit_header pub_methods_classXapian_1_1PostingSource"><td colspan="2" onclick="javascript:dynsection.toggleInherit('pub_methods_classXapian_1_1PostingSource')"><span class="dynarrow"><span class="arrowhead closed"></span></span>Public Member Functions inherited from <a class="el" href="classXapian_1_1PostingSource.html">Xapian::PostingSource</a></td></tr> |
| 140 |
<tr class="memitem:a82e85d6113d9c8e72cbbf4b3362f3fd6 inherit pub_methods_classXapian_1_1PostingSource" id="r_a82e85d6113d9c8e72cbbf4b3362f3fd6"><td class="memItemLeft" align="right" valign="top"> |
| 141 |
 </td><td class="memItemRight" valign="bottom"><b>PostingSource</b> ()</td></tr> |
| 142 |
<tr class="memdesc:a82e85d6113d9c8e72cbbf4b3362f3fd6 inherit pub_methods_classXapian_1_1PostingSource"><td class="mdescLeft"> </td><td class="mdescRight">Allow subclasses to be instantiated. <br /></td></tr> |
| 143 |
<tr class="memitem:a7201a6a189625b17f501561dcc3ea8a1 inherit pub_methods_classXapian_1_1PostingSource" id="r_a7201a6a189625b17f501561dcc3ea8a1"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1PostingSource.html#a7201a6a189625b17f501561dcc3ea8a1">set_maxweight</a> (double max_weight)</td></tr> |
| 144 |
<tr class="memdesc:a7201a6a189625b17f501561dcc3ea8a1 inherit pub_methods_classXapian_1_1PostingSource"><td class="mdescLeft"> </td><td class="mdescRight">Specify an upper bound on what <a class="el" href="classXapian_1_1PostingSource.html#a3922b7e3572eea6d3e39fc26cc7fed7a" title="Return the weight contribution for the current document.">get_weight()</a> will return from now on. <br /></td></tr> |
| 145 |
<tr class="memitem:a1a447843283a8ef88b3d4662c97c87b4 inherit pub_methods_classXapian_1_1PostingSource" id="r_a1a447843283a8ef88b3d4662c97c87b4"><td class="memItemLeft" align="right" valign="top"> |
| 146 |
double </td><td class="memItemRight" valign="bottom"><b>get_maxweight</b> () const</td></tr> |
| 147 |
<tr class="memdesc:a1a447843283a8ef88b3d4662c97c87b4 inherit pub_methods_classXapian_1_1PostingSource"><td class="mdescLeft"> </td><td class="mdescRight">Return the currently set upper bound on what <a class="el" href="classXapian_1_1PostingSource.html#a3922b7e3572eea6d3e39fc26cc7fed7a" title="Return the weight contribution for the current document.">get_weight()</a> can return. <br /></td></tr> |
| 148 |
<tr class="memitem:adf7161bbfff95fedf27640342672adc6 inherit pub_methods_classXapian_1_1PostingSource" id="r_adf7161bbfff95fedf27640342672adc6"><td class="memItemLeft" align="right" valign="top">virtual PostingSource * </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1PostingSource.html#adf7161bbfff95fedf27640342672adc6">unserialise</a> (const std::string &serialised) const</td></tr> |
| 149 |
<tr class="memdesc:adf7161bbfff95fedf27640342672adc6 inherit pub_methods_classXapian_1_1PostingSource"><td class="mdescLeft"> </td><td class="mdescRight">Create object given string serialisation returned by <a class="el" href="classXapian_1_1PostingSource.html#a0ad6b98d6b5e79a37b7a1d7874725894" title="Serialise object parameters into a string.">serialise()</a>. <br /></td></tr> |
| 150 |
<tr class="memitem:a60fc251bd7c2f46536256f6b9898caf3 inherit pub_methods_classXapian_1_1PostingSource" id="r_a60fc251bd7c2f46536256f6b9898caf3"><td class="memItemLeft" align="right" valign="top">PostingSource * </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1PostingSource.html#a60fc251bd7c2f46536256f6b9898caf3">release</a> ()</td></tr> |
| 151 |
<tr class="memdesc:a60fc251bd7c2f46536256f6b9898caf3 inherit pub_methods_classXapian_1_1PostingSource"><td class="mdescLeft"> </td><td class="mdescRight">Start reference counting this object. <br /></td></tr> |
| 152 |
<tr class="memitem:aa99a103682c892018a1452f88c31664a inherit pub_methods_classXapian_1_1PostingSource" id="r_aa99a103682c892018a1452f88c31664a"><td class="memItemLeft" align="right" valign="top">const PostingSource * </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1PostingSource.html#aa99a103682c892018a1452f88c31664a">release</a> () const</td></tr> |
| 153 |
<tr class="memdesc:aa99a103682c892018a1452f88c31664a inherit pub_methods_classXapian_1_1PostingSource"><td class="mdescLeft"> </td><td class="mdescRight">Start reference counting this object. <br /></td></tr> |
| 154 |
</table><table class="memberdecls"> |
| 155 |
<tr class="heading"><td colspan="2"><h2 id="header-inherited" class="groupheader"><a id="inherited" name="inherited"></a> |
| 156 |
Additional Inherited Members</h2></td></tr> |
| 157 |
<tr class="inherit_header pro_attribs_classXapian_1_1ValuePostingSource"><td colspan="2" onclick="javascript:dynsection.toggleInherit('pro_attribs_classXapian_1_1ValuePostingSource')"><span class="dynarrow"><span class="arrowhead closed"></span></span>Protected Attributes inherited from <a class="el" href="classXapian_1_1ValuePostingSource.html">Xapian::ValuePostingSource</a></td></tr> |
| 158 |
<tr class="memitem:a3bbef981fa3fac528dfee36248e55f44 inherit pro_attribs_classXapian_1_1ValuePostingSource" id="r_a3bbef981fa3fac528dfee36248e55f44"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classXapian_1_1Database.html">Xapian::Database</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#a3bbef981fa3fac528dfee36248e55f44">db</a></td></tr> |
| 159 |
<tr class="memdesc:a3bbef981fa3fac528dfee36248e55f44 inherit pro_attribs_classXapian_1_1ValuePostingSource"><td class="mdescLeft"> </td><td class="mdescRight">The database we're reading values from. <br /></td></tr> |
| 160 |
<tr class="memitem:ac6102f72ea311d470d083859838bf9d8 inherit pro_attribs_classXapian_1_1ValuePostingSource" id="r_ac6102f72ea311d470d083859838bf9d8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceXapian.html#a94a899651fa920c72ffa9635bde630ea">Xapian::valueno</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#ac6102f72ea311d470d083859838bf9d8">slot</a></td></tr> |
| 161 |
<tr class="memdesc:ac6102f72ea311d470d083859838bf9d8 inherit pro_attribs_classXapian_1_1ValuePostingSource"><td class="mdescLeft"> </td><td class="mdescRight">The slot we're reading values from. <br /></td></tr> |
| 162 |
<tr class="memitem:a650c27f6c7891bb2e0f4d96c6f743e04 inherit pro_attribs_classXapian_1_1ValuePostingSource" id="r_a650c27f6c7891bb2e0f4d96c6f743e04"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classXapian_1_1ValueIterator.html">Xapian::ValueIterator</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#a650c27f6c7891bb2e0f4d96c6f743e04">value_it</a></td></tr> |
| 163 |
<tr class="memdesc:a650c27f6c7891bb2e0f4d96c6f743e04 inherit pro_attribs_classXapian_1_1ValuePostingSource"><td class="mdescLeft"> </td><td class="mdescRight">Value stream iterator. <br /></td></tr> |
| 164 |
<tr class="memitem:adc20089597b9ff9993526bd95d2fb653 inherit pro_attribs_classXapian_1_1ValuePostingSource" id="r_adc20089597b9ff9993526bd95d2fb653"><td class="memItemLeft" align="right" valign="top">bool & </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#adc20089597b9ff9993526bd95d2fb653">started</a></td></tr> |
| 165 |
<tr class="memdesc:adc20089597b9ff9993526bd95d2fb653 inherit pro_attribs_classXapian_1_1ValuePostingSource"><td class="mdescLeft"> </td><td class="mdescRight">Flag indicating if we've started (true if we have). <br /></td></tr> |
| 166 |
<tr class="memitem:ad04e70cdc505898beef5911130322746 inherit pro_attribs_classXapian_1_1ValuePostingSource" id="r_ad04e70cdc505898beef5911130322746"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceXapian.html#a9bbd62a8e56ea4619e4e59afb32aced6">Xapian::doccount</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#ad04e70cdc505898beef5911130322746">termfreq_min</a></td></tr> |
| 167 |
<tr class="memdesc:ad04e70cdc505898beef5911130322746 inherit pro_attribs_classXapian_1_1ValuePostingSource"><td class="mdescLeft"> </td><td class="mdescRight">A lower bound on the term frequency. <br /></td></tr> |
| 168 |
<tr class="memitem:a3bcadb7f9aace4bf1b577b4318451df2 inherit pro_attribs_classXapian_1_1ValuePostingSource" id="r_a3bcadb7f9aace4bf1b577b4318451df2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceXapian.html#a9bbd62a8e56ea4619e4e59afb32aced6">Xapian::doccount</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#a3bcadb7f9aace4bf1b577b4318451df2">termfreq_est</a></td></tr> |
| 169 |
<tr class="memdesc:a3bcadb7f9aace4bf1b577b4318451df2 inherit pro_attribs_classXapian_1_1ValuePostingSource"><td class="mdescLeft"> </td><td class="mdescRight">An estimate of the term frequency. <br /></td></tr> |
| 170 |
<tr class="memitem:a897f7b589182ce1ca88ed027570b2d4e inherit pro_attribs_classXapian_1_1ValuePostingSource" id="r_a897f7b589182ce1ca88ed027570b2d4e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceXapian.html#a9bbd62a8e56ea4619e4e59afb32aced6">Xapian::doccount</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#a897f7b589182ce1ca88ed027570b2d4e">termfreq_max</a></td></tr> |
| 171 |
<tr class="memdesc:a897f7b589182ce1ca88ed027570b2d4e inherit pro_attribs_classXapian_1_1ValuePostingSource"><td class="mdescLeft"> </td><td class="mdescRight">An upper bound on the term frequency. <br /></td></tr> |
| 172 |
</table> |
| 173 |
<a name="details" id="details"></a><h2 id="header-details" class="groupheader">Detailed Description</h2> |
| 174 |
<div class="textblock"><p>Posting source which returns a weight based on geospatial distance. </p> |
| 175 |
<p>Experimental - see <a href="https://xapian.org/docs/deprecation#experimental-features">https://xapian.org/docs/deprecation#experimental-features</a></p> |
| 176 |
<p>Results are weighted by the distance from a fixed point, or list of points, calculated according to the metric supplied. If multiple points are supplied (either in the constructor, or in the coordinates stored in a document), the closest pointwise distance is used.</p> |
| 177 |
<p>Documents further away than a specified maximum range (or with no location stored in the specified slot) will not be returned.</p> |
| 178 |
<p>The weight returned is computed from the distance using the formula:</p> |
| 179 |
<p>k1 * pow(distance + k1, -k2)</p> |
| 180 |
<p>(Where k1 and k2 are (strictly) positive, floating point constants, which default to 1000 and 1, respectively. Distance is measured in metres, so this means that something at the centre gets a weight of 1.0, something 1km away gets a weight of 0.5, and something 3km away gets a weight of 0.25, etc) </p> |
| 181 |
</div><a name="doc-constructors" id="doc-constructors"></a><h2 id="header-doc-constructors" class="groupheader">Constructor & Destructor Documentation</h2> |
| 182 |
<a id="a4659a2d806060f7cb37d12a94cc1ef3b" name="a4659a2d806060f7cb37d12a94cc1ef3b"></a> |
| 183 |
<h2 class="memtitle"><span class="permalink"><a href="#a4659a2d806060f7cb37d12a94cc1ef3b">◆ </a></span>LatLongDistancePostingSource() <span class="overload">[1/2]</span></h2> |
| 184 |
|
| 185 |
<div class="memitem"> |
| 186 |
<div class="memproto"> |
| 187 |
<table class="memname"> |
| 188 |
<tr> |
| 189 |
<td class="memname">Xapian::LatLongDistancePostingSource::LatLongDistancePostingSource </td> |
| 190 |
<td>(</td> |
| 191 |
<td class="paramtype"><a class="el" href="namespaceXapian.html#a94a899651fa920c72ffa9635bde630ea">Xapian::valueno</a></td> <td class="paramname"><span class="paramname"><em>slot_</em></span>, </td> |
| 192 |
</tr> |
| 193 |
<tr> |
| 194 |
<td class="paramkey"></td> |
| 195 |
<td></td> |
| 196 |
<td class="paramtype">const <a class="el" href="classXapian_1_1LatLongCoords.html">LatLongCoords</a> &</td> <td class="paramname"><span class="paramname"><em>centre_</em></span>, </td> |
| 197 |
</tr> |
| 198 |
<tr> |
| 199 |
<td class="paramkey"></td> |
| 200 |
<td></td> |
| 201 |
<td class="paramtype">const <a class="el" href="classXapian_1_1LatLongMetric.html">LatLongMetric</a> &</td> <td class="paramname"><span class="paramname"><em>metric_</em></span>, </td> |
| 202 |
</tr> |
| 203 |
<tr> |
| 204 |
<td class="paramkey"></td> |
| 205 |
<td></td> |
| 206 |
<td class="paramtype">double</td> <td class="paramname"><span class="paramname"><em>max_range_</em></span><span class="paramdefsep"> = </span><span class="paramdefval">0.0</span>, </td> |
| 207 |
</tr> |
| 208 |
<tr> |
| 209 |
<td class="paramkey"></td> |
| 210 |
<td></td> |
| 211 |
<td class="paramtype">double</td> <td class="paramname"><span class="paramname"><em>k1_</em></span><span class="paramdefsep"> = </span><span class="paramdefval">1000.0</span>, </td> |
| 212 |
</tr> |
| 213 |
<tr> |
| 214 |
<td class="paramkey"></td> |
| 215 |
<td></td> |
| 216 |
<td class="paramtype">double</td> <td class="paramname"><span class="paramname"><em>k2_</em></span><span class="paramdefsep"> = </span><span class="paramdefval">1.0</span> )</td> |
| 217 |
</tr> |
| 218 |
</table> |
| 219 |
</div><div class="memdoc"> |
| 220 |
|
| 221 |
<p>Construct a new posting source which returns only documents within range of one of the central coordinates. </p> |
| 222 |
<dl class="params"><dt>Parameters</dt><dd> |
| 223 |
<table class="params"> |
| 224 |
<tr><td class="paramname">slot_</td><td>The value slot to read values from. </td></tr> |
| 225 |
<tr><td class="paramname">centre_</td><td>The centre point to use for distance calculations. </td></tr> |
| 226 |
<tr><td class="paramname">metric_</td><td>The metric to use for distance calculations. </td></tr> |
| 227 |
<tr><td class="paramname">max_range_</td><td>The maximum distance for documents which are returned. </td></tr> |
| 228 |
<tr><td class="paramname">k1_</td><td>The k1 constant to use in the weighting function. </td></tr> |
| 229 |
<tr><td class="paramname">k2_</td><td>The k2 constant to use in the weighting function. </td></tr> |
| 230 |
</table> |
| 231 |
</dd> |
| 232 |
</dl> |
| 233 |
|
| 234 |
</div> |
| 235 |
</div> |
| 236 |
<a id="af7a0bc39e32604f93928d9708817f824" name="af7a0bc39e32604f93928d9708817f824"></a> |
| 237 |
<h2 class="memtitle"><span class="permalink"><a href="#af7a0bc39e32604f93928d9708817f824">◆ </a></span>LatLongDistancePostingSource() <span class="overload">[2/2]</span></h2> |
| 238 |
|
| 239 |
<div class="memitem"> |
| 240 |
<div class="memproto"> |
| 241 |
<table class="memname"> |
| 242 |
<tr> |
| 243 |
<td class="memname">Xapian::LatLongDistancePostingSource::LatLongDistancePostingSource </td> |
| 244 |
<td>(</td> |
| 245 |
<td class="paramtype"><a class="el" href="namespaceXapian.html#a94a899651fa920c72ffa9635bde630ea">Xapian::valueno</a></td> <td class="paramname"><span class="paramname"><em>slot_</em></span>, </td> |
| 246 |
</tr> |
| 247 |
<tr> |
| 248 |
<td class="paramkey"></td> |
| 249 |
<td></td> |
| 250 |
<td class="paramtype">const <a class="el" href="classXapian_1_1LatLongCoords.html">LatLongCoords</a> &</td> <td class="paramname"><span class="paramname"><em>centre_</em></span>, </td> |
| 251 |
</tr> |
| 252 |
<tr> |
| 253 |
<td class="paramkey"></td> |
| 254 |
<td></td> |
| 255 |
<td class="paramtype">double</td> <td class="paramname"><span class="paramname"><em>max_range_</em></span><span class="paramdefsep"> = </span><span class="paramdefval">0.0</span>, </td> |
| 256 |
</tr> |
| 257 |
<tr> |
| 258 |
<td class="paramkey"></td> |
| 259 |
<td></td> |
| 260 |
<td class="paramtype">double</td> <td class="paramname"><span class="paramname"><em>k1_</em></span><span class="paramdefsep"> = </span><span class="paramdefval">1000.0</span>, </td> |
| 261 |
</tr> |
| 262 |
<tr> |
| 263 |
<td class="paramkey"></td> |
| 264 |
<td></td> |
| 265 |
<td class="paramtype">double</td> <td class="paramname"><span class="paramname"><em>k2_</em></span><span class="paramdefsep"> = </span><span class="paramdefval">1.0</span> )</td> |
| 266 |
</tr> |
| 267 |
</table> |
| 268 |
</div><div class="memdoc"> |
| 269 |
|
| 270 |
<p>Construct a new posting source which returns only documents within range of one of the central coordinates. </p> |
| 271 |
<dl class="params"><dt>Parameters</dt><dd> |
| 272 |
<table class="params"> |
| 273 |
<tr><td class="paramname">slot_</td><td>The value slot to read values from. </td></tr> |
| 274 |
<tr><td class="paramname">centre_</td><td>The centre point to use for distance calculations. </td></tr> |
| 275 |
<tr><td class="paramname">max_range_</td><td>The maximum distance for documents which are returned. </td></tr> |
| 276 |
<tr><td class="paramname">k1_</td><td>The k1 constant to use in the weighting function. </td></tr> |
| 277 |
<tr><td class="paramname">k2_</td><td>The k2 constant to use in the weighting function.</td></tr> |
| 278 |
</table> |
| 279 |
</dd> |
| 280 |
</dl> |
| 281 |
<p><a class="el" href="classXapian_1_1GreatCircleMetric.html" title="Calculate the great-circle distance between two coordinates on a sphere.">Xapian::GreatCircleMetric</a> is used as the metric. </p> |
| 282 |
|
| 283 |
</div> |
| 284 |
</div> |
| 285 |
<a name="doc-func-members" id="doc-func-members"></a><h2 id="header-doc-func-members" class="groupheader">Member Function Documentation</h2> |
| 286 |
<a id="a89b0848c6423fa83ed22f43652e79077" name="a89b0848c6423fa83ed22f43652e79077"></a> |
| 287 |
<h2 class="memtitle"><span class="permalink"><a href="#a89b0848c6423fa83ed22f43652e79077">◆ </a></span>check()</h2> |
| 288 |
|
| 289 |
<div class="memitem"> |
| 290 |
<div class="memproto"> |
| 291 |
<table class="mlabels"> |
| 292 |
<tr> |
| 293 |
<td class="mlabels-left"> |
| 294 |
<table class="memname"> |
| 295 |
<tr> |
| 296 |
<td class="memname">bool Xapian::LatLongDistancePostingSource::check </td> |
| 297 |
<td>(</td> |
| 298 |
<td class="paramtype"><a class="el" href="namespaceXapian.html#ad8f7a78bc920532b7d2baa3281b33e2f">Xapian::docid</a></td> <td class="paramname"><span class="paramname"><em>did</em></span>, </td> |
| 299 |
</tr> |
| 300 |
<tr> |
| 301 |
<td class="paramkey"></td> |
| 302 |
<td></td> |
| 303 |
<td class="paramtype">double</td> <td class="paramname"><span class="paramname"><em>min_wt</em></span> )</td> |
| 304 |
</tr> |
| 305 |
</table> |
| 306 |
</td> |
| 307 |
<td class="mlabels-right"> |
| 308 |
<span class="mlabels"><span class="mlabel virtual">virtual</span></span> </td> |
| 309 |
</tr> |
| 310 |
</table> |
| 311 |
</div><div class="memdoc"> |
| 312 |
|
| 313 |
<p>Check if the specified docid occurs. </p> |
| 314 |
<p>The caller is required to ensure that the specified document id <em class="arg">did</em> actually exists in the database. If it does, it must move to that document id, and return true. If it does not, it may either:</p> |
| 315 |
<ul> |
| 316 |
<li>return true, having moved to a definite position (including "at_end"), which must be the same position as <a class="el" href="#a85e5437efbd9b9e016bc3cd12b41b0db" title="Advance to the specified docid.">skip_to()</a> would have moved to.</li> |
| 317 |
</ul> |
| 318 |
<p>or</p> |
| 319 |
<ul> |
| 320 |
<li>return false, having moved to an "indeterminate" position, such that a subsequent call to <a class="el" href="#a563dd69bf4113b73aa12335c3e282ae5" title="Advance the current position to the next matching document.">next()</a> or <a class="el" href="#a85e5437efbd9b9e016bc3cd12b41b0db" title="Advance to the specified docid.">skip_to()</a> will move to the next matching position after <em class="arg">did</em>.</li> |
| 321 |
</ul> |
| 322 |
<p>Generally, this method should act like <a class="el" href="#a85e5437efbd9b9e016bc3cd12b41b0db" title="Advance to the specified docid.">skip_to()</a> and return true if that can be done at little extra cost.</p> |
| 323 |
<p>Otherwise it should simply check if a particular docid is present, returning true if it is, and false if it isn't.</p> |
| 324 |
<p>The default implementation calls <a class="el" href="#a85e5437efbd9b9e016bc3cd12b41b0db" title="Advance to the specified docid.">skip_to()</a> and always returns true.</p> |
| 325 |
<p><a class="el" href="namespaceXapian.html" title="The Xapian namespace contains public interfaces for the Xapian library.">Xapian</a> will always call <a class="el" href="#ac3bb27d2891a9f3a8a2ceee0eaa0e747" title="Set this PostingSource to the start of the list of postings.">init()</a> on a <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> before calling this for the first time.</p> |
| 326 |
<p>Note: in the case of a multi-database search, the docid specified is the docid in the single subdatabase relevant to this posting source. See the <em class="arg"><a class="el" href="#ac3bb27d2891a9f3a8a2ceee0eaa0e747" title="Set this PostingSource to the start of the list of postings.">init()</a></em> method for details.</p> |
| 327 |
<dl class="params"><dt>Parameters</dt><dd> |
| 328 |
<table class="params"> |
| 329 |
<tr><td class="paramname">did</td><td>The document id to check. </td></tr> |
| 330 |
<tr><td class="paramname">min_wt</td><td>The minimum weight contribution that is needed (this is just a hint which subclasses may ignore). </td></tr> |
| 331 |
</table> |
| 332 |
</dd> |
| 333 |
</dl> |
| 334 |
|
| 335 |
<p>Reimplemented from <a class="el" href="classXapian_1_1PostingSource.html#a964696f90b6485bf3c931ccf4546a273">Xapian::PostingSource</a>.</p> |
| 336 |
|
| 337 |
</div> |
| 338 |
</div> |
| 339 |
<a id="a1d05a87e0672376a1cbd160c26f341a9" name="a1d05a87e0672376a1cbd160c26f341a9"></a> |
| 340 |
<h2 class="memtitle"><span class="permalink"><a href="#a1d05a87e0672376a1cbd160c26f341a9">◆ </a></span>clone()</h2> |
| 341 |
|
| 342 |
<div class="memitem"> |
| 343 |
<div class="memproto"> |
| 344 |
<table class="mlabels"> |
| 345 |
<tr> |
| 346 |
<td class="mlabels-left"> |
| 347 |
<table class="memname"> |
| 348 |
<tr> |
| 349 |
<td class="memname">LatLongDistancePostingSource * Xapian::LatLongDistancePostingSource::clone </td> |
| 350 |
<td>(</td> |
| 351 |
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td> |
| 352 |
<td> const</td> |
| 353 |
</tr> |
| 354 |
</table> |
| 355 |
</td> |
| 356 |
<td class="mlabels-right"> |
| 357 |
<span class="mlabels"><span class="mlabel virtual">virtual</span></span> </td> |
| 358 |
</tr> |
| 359 |
</table> |
| 360 |
</div><div class="memdoc"> |
| 361 |
|
| 362 |
<p>Clone the posting source. </p> |
| 363 |
<p>The clone should inherit the configuration of the parent, but need not inherit the state. ie, the clone does not need to be in the same iteration position as the original: the matcher will always call <a class="el" href="#ac3bb27d2891a9f3a8a2ceee0eaa0e747" title="Set this PostingSource to the start of the list of postings.">init()</a> on the clone before attempting to move the iterator, or read the information about the current position of the iterator.</p> |
| 364 |
<p>This may return NULL to indicate that cloning is not supported. In this case, the <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> may only be used with a single-database search.</p> |
| 365 |
<p>The default implementation returns NULL.</p> |
| 366 |
<p>Note that the returned object will be deallocated by <a class="el" href="namespaceXapian.html" title="The Xapian namespace contains public interfaces for the Xapian library.">Xapian</a> after use with "delete". If you want to handle the deletion in a special way (for example when wrapping the <a class="el" href="namespaceXapian.html" title="The Xapian namespace contains public interfaces for the Xapian library.">Xapian</a> API for use from another language) then you can define a static <code>operator delete</code> method in your subclass as shown here: <a href="https://trac.xapian.org/ticket/554#comment:1">https://trac.xapian.org/ticket/554#comment:1</a> </p> |
| 367 |
|
| 368 |
<p>Reimplemented from <a class="el" href="classXapian_1_1PostingSource.html#a5cf13187b0d403b63888dd532bbfe7f6">Xapian::PostingSource</a>.</p> |
| 369 |
|
| 370 |
</div> |
| 371 |
</div> |
| 372 |
<a id="a6f7e0a9442cd671295abbb69f5c4ad13" name="a6f7e0a9442cd671295abbb69f5c4ad13"></a> |
| 373 |
<h2 class="memtitle"><span class="permalink"><a href="#a6f7e0a9442cd671295abbb69f5c4ad13">◆ </a></span>get_description()</h2> |
| 374 |
|
| 375 |
<div class="memitem"> |
| 376 |
<div class="memproto"> |
| 377 |
<table class="mlabels"> |
| 378 |
<tr> |
| 379 |
<td class="mlabels-left"> |
| 380 |
<table class="memname"> |
| 381 |
<tr> |
| 382 |
<td class="memname">std::string Xapian::LatLongDistancePostingSource::get_description </td> |
| 383 |
<td>(</td> |
| 384 |
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td> |
| 385 |
<td> const</td> |
| 386 |
</tr> |
| 387 |
</table> |
| 388 |
</td> |
| 389 |
<td class="mlabels-right"> |
| 390 |
<span class="mlabels"><span class="mlabel virtual">virtual</span></span> </td> |
| 391 |
</tr> |
| 392 |
</table> |
| 393 |
</div><div class="memdoc"> |
| 394 |
|
| 395 |
<p>Return a string describing this object. </p> |
| 396 |
<p>This default implementation returns a generic answer. This default it provided to avoid forcing those deriving their own <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> subclass from having to implement this (they may not care what <a class="el" href="#a6f7e0a9442cd671295abbb69f5c4ad13" title="Return a string describing this object.">get_description()</a> gives for their subclass). </p> |
| 397 |
|
| 398 |
<p>Reimplemented from <a class="el" href="classXapian_1_1PostingSource.html#a8a619b261e7d9db7cb7ccef9869afac8">Xapian::PostingSource</a>.</p> |
| 399 |
|
| 400 |
</div> |
| 401 |
</div> |
| 402 |
<a id="a7fecce9dea6df827943c379caa2d0cd2" name="a7fecce9dea6df827943c379caa2d0cd2"></a> |
| 403 |
<h2 class="memtitle"><span class="permalink"><a href="#a7fecce9dea6df827943c379caa2d0cd2">◆ </a></span>get_weight()</h2> |
| 404 |
|
| 405 |
<div class="memitem"> |
| 406 |
<div class="memproto"> |
| 407 |
<table class="mlabels"> |
| 408 |
<tr> |
| 409 |
<td class="mlabels-left"> |
| 410 |
<table class="memname"> |
| 411 |
<tr> |
| 412 |
<td class="memname">double Xapian::LatLongDistancePostingSource::get_weight </td> |
| 413 |
<td>(</td> |
| 414 |
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td> |
| 415 |
<td> const</td> |
| 416 |
</tr> |
| 417 |
</table> |
| 418 |
</td> |
| 419 |
<td class="mlabels-right"> |
| 420 |
<span class="mlabels"><span class="mlabel virtual">virtual</span></span> </td> |
| 421 |
</tr> |
| 422 |
</table> |
| 423 |
</div><div class="memdoc"> |
| 424 |
|
| 425 |
<p>Return the weight contribution for the current document. </p> |
| 426 |
<p>This default implementation always returns 0, for convenience when implementing "weight-less" <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> subclasses.</p> |
| 427 |
<p>This method may assume that it will only be called when there is a "current document". In detail: <a class="el" href="namespaceXapian.html" title="The Xapian namespace contains public interfaces for the Xapian library.">Xapian</a> will always call <a class="el" href="#ac3bb27d2891a9f3a8a2ceee0eaa0e747" title="Set this PostingSource to the start of the list of postings.">init()</a> on a <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> before calling this for the first time. It will also only call this if the <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> reports that it is pointing to a valid document (ie, it will not call it before calling at least one of <a class="el" href="#a563dd69bf4113b73aa12335c3e282ae5" title="Advance the current position to the next matching document.">next()</a>, <a class="el" href="#a85e5437efbd9b9e016bc3cd12b41b0db" title="Advance to the specified docid.">skip_to()</a> or <a class="el" href="#a89b0848c6423fa83ed22f43652e79077" title="Check if the specified docid occurs.">check()</a>, and will ensure that the <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> is not at the end by calling <a class="el" href="classXapian_1_1ValuePostingSource.html#a53d851ba1e75670c28c9508921273dc0" title="Return true if the current position is past the last entry in this list.">at_end()</a>). </p> |
| 428 |
|
| 429 |
<p>Reimplemented from <a class="el" href="classXapian_1_1PostingSource.html#a3922b7e3572eea6d3e39fc26cc7fed7a">Xapian::PostingSource</a>.</p> |
| 430 |
|
| 431 |
</div> |
| 432 |
</div> |
| 433 |
<a id="ac3bb27d2891a9f3a8a2ceee0eaa0e747" name="ac3bb27d2891a9f3a8a2ceee0eaa0e747"></a> |
| 434 |
<h2 class="memtitle"><span class="permalink"><a href="#ac3bb27d2891a9f3a8a2ceee0eaa0e747">◆ </a></span>init()</h2> |
| 435 |
|
| 436 |
<div class="memitem"> |
| 437 |
<div class="memproto"> |
| 438 |
<table class="mlabels"> |
| 439 |
<tr> |
| 440 |
<td class="mlabels-left"> |
| 441 |
<table class="memname"> |
| 442 |
<tr> |
| 443 |
<td class="memname">void Xapian::LatLongDistancePostingSource::init </td> |
| 444 |
<td>(</td> |
| 445 |
<td class="paramtype">const <a class="el" href="classXapian_1_1Database.html">Database</a> &</td> <td class="paramname"><span class="paramname"><em>db</em></span></td><td>)</td> |
| 446 |
<td></td> |
| 447 |
</tr> |
| 448 |
</table> |
| 449 |
</td> |
| 450 |
<td class="mlabels-right"> |
| 451 |
<span class="mlabels"><span class="mlabel virtual">virtual</span></span> </td> |
| 452 |
</tr> |
| 453 |
</table> |
| 454 |
</div><div class="memdoc"> |
| 455 |
|
| 456 |
<p>Set this <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> to the start of the list of postings. </p> |
| 457 |
<p>This is called automatically by the matcher prior to each query being processed.</p> |
| 458 |
<p>If a <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> is used for multiple searches, <em class="arg"><a class="el" href="#ac3bb27d2891a9f3a8a2ceee0eaa0e747" title="Set this PostingSource to the start of the list of postings.">init()</a></em> will therefore be called multiple times, and must handle this by using the database passed in the most recent call.</p> |
| 459 |
<dl class="params"><dt>Parameters</dt><dd> |
| 460 |
<table class="params"> |
| 461 |
<tr><td class="paramname">db</td><td>The database which the <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> should iterate through.</td></tr> |
| 462 |
</table> |
| 463 |
</dd> |
| 464 |
</dl> |
| 465 |
<p>Note: in the case of a multi-database search, a separate <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> will be used for each database (the separate PostingSources will be obtained using <em class="arg"><a class="el" href="#a1d05a87e0672376a1cbd160c26f341a9" title="Clone the posting source.">clone()</a></em>), and each <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> will be passed one of the sub-databases as the <em class="arg">db</em> parameter here. The <em class="arg">db</em> parameter will therefore always refer to a single database. All docids passed to, or returned from, the <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> refer to docids in that single database, rather than in the multi-database. </p> |
| 466 |
|
| 467 |
<p>Implements <a class="el" href="classXapian_1_1PostingSource.html#a81d793170b496022488c15c3508979b5">Xapian::PostingSource</a>.</p> |
| 468 |
|
| 469 |
</div> |
| 470 |
</div> |
| 471 |
<a id="a4ad81327348feeb9b68c3e37d26f45c7" name="a4ad81327348feeb9b68c3e37d26f45c7"></a> |
| 472 |
<h2 class="memtitle"><span class="permalink"><a href="#a4ad81327348feeb9b68c3e37d26f45c7">◆ </a></span>name()</h2> |
| 473 |
|
| 474 |
<div class="memitem"> |
| 475 |
<div class="memproto"> |
| 476 |
<table class="mlabels"> |
| 477 |
<tr> |
| 478 |
<td class="mlabels-left"> |
| 479 |
<table class="memname"> |
| 480 |
<tr> |
| 481 |
<td class="memname">std::string Xapian::LatLongDistancePostingSource::name </td> |
| 482 |
<td>(</td> |
| 483 |
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td> |
| 484 |
<td> const</td> |
| 485 |
</tr> |
| 486 |
</table> |
| 487 |
</td> |
| 488 |
<td class="mlabels-right"> |
| 489 |
<span class="mlabels"><span class="mlabel virtual">virtual</span></span> </td> |
| 490 |
</tr> |
| 491 |
</table> |
| 492 |
</div><div class="memdoc"> |
| 493 |
|
| 494 |
<p>Name of the posting source class. </p> |
| 495 |
<p>This is used when serialising and unserialising posting sources; for example, for performing remote searches.</p> |
| 496 |
<p>If the subclass is in a C++ namespace, the namespace should be included in the name, using "::" as a separator. For example, for a <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> subclass called "FooPostingSource" in the "Xapian" namespace the result of this call should be "Xapian::FooPostingSource".</p> |
| 497 |
<p>This should only be implemented if <a class="el" href="#a7c3687449188ea137dec58065906fc0f" title="Serialise object parameters into a string.">serialise()</a> and <a class="el" href="classXapian_1_1PostingSource.html#adf7161bbfff95fedf27640342672adc6" title="Create object given string serialisation returned by serialise().">unserialise()</a> are also implemented. The default implementation returns an empty string.</p> |
| 498 |
<p>If this returns an empty string, <a class="el" href="namespaceXapian.html" title="The Xapian namespace contains public interfaces for the Xapian library.">Xapian</a> will assume that <a class="el" href="#a7c3687449188ea137dec58065906fc0f" title="Serialise object parameters into a string.">serialise()</a> and <a class="el" href="classXapian_1_1PostingSource.html#adf7161bbfff95fedf27640342672adc6" title="Create object given string serialisation returned by serialise().">unserialise()</a> are not implemented. </p> |
| 499 |
|
| 500 |
<p>Reimplemented from <a class="el" href="classXapian_1_1PostingSource.html#a6cbbe96a7bb0d2a8c9de3d5d8b99675d">Xapian::PostingSource</a>.</p> |
| 501 |
|
| 502 |
</div> |
| 503 |
</div> |
| 504 |
<a id="a563dd69bf4113b73aa12335c3e282ae5" name="a563dd69bf4113b73aa12335c3e282ae5"></a> |
| 505 |
<h2 class="memtitle"><span class="permalink"><a href="#a563dd69bf4113b73aa12335c3e282ae5">◆ </a></span>next()</h2> |
| 506 |
|
| 507 |
<div class="memitem"> |
| 508 |
<div class="memproto"> |
| 509 |
<table class="mlabels"> |
| 510 |
<tr> |
| 511 |
<td class="mlabels-left"> |
| 512 |
<table class="memname"> |
| 513 |
<tr> |
| 514 |
<td class="memname">void Xapian::LatLongDistancePostingSource::next </td> |
| 515 |
<td>(</td> |
| 516 |
<td class="paramtype">double</td> <td class="paramname"><span class="paramname"><em>min_wt</em></span></td><td>)</td> |
| 517 |
<td></td> |
| 518 |
</tr> |
| 519 |
</table> |
| 520 |
</td> |
| 521 |
<td class="mlabels-right"> |
| 522 |
<span class="mlabels"><span class="mlabel virtual">virtual</span></span> </td> |
| 523 |
</tr> |
| 524 |
</table> |
| 525 |
</div><div class="memdoc"> |
| 526 |
|
| 527 |
<p>Advance the current position to the next matching document. </p> |
| 528 |
<p>The <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> starts before the first entry in the list, so <a class="el" href="#a563dd69bf4113b73aa12335c3e282ae5" title="Advance the current position to the next matching document.">next()</a>, <a class="el" href="#a85e5437efbd9b9e016bc3cd12b41b0db" title="Advance to the specified docid.">skip_to()</a> or <a class="el" href="#a89b0848c6423fa83ed22f43652e79077" title="Check if the specified docid occurs.">check()</a> must be called before any methods which need the context of the current position.</p> |
| 529 |
<p><a class="el" href="namespaceXapian.html" title="The Xapian namespace contains public interfaces for the Xapian library.">Xapian</a> will always call <a class="el" href="#ac3bb27d2891a9f3a8a2ceee0eaa0e747" title="Set this PostingSource to the start of the list of postings.">init()</a> on a <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> before calling this for the first time.</p> |
| 530 |
<dl class="params"><dt>Parameters</dt><dd> |
| 531 |
<table class="params"> |
| 532 |
<tr><td class="paramname">min_wt</td><td>The minimum weight contribution that is needed (this is just a hint which subclasses may ignore). </td></tr> |
| 533 |
</table> |
| 534 |
</dd> |
| 535 |
</dl> |
| 536 |
|
| 537 |
<p>Implements <a class="el" href="classXapian_1_1PostingSource.html#a150c4c07ff4e959f448dd8cf840968e8">Xapian::PostingSource</a>.</p> |
| 538 |
|
| 539 |
</div> |
| 540 |
</div> |
| 541 |
<a id="a7c3687449188ea137dec58065906fc0f" name="a7c3687449188ea137dec58065906fc0f"></a> |
| 542 |
<h2 class="memtitle"><span class="permalink"><a href="#a7c3687449188ea137dec58065906fc0f">◆ </a></span>serialise()</h2> |
| 543 |
|
| 544 |
<div class="memitem"> |
| 545 |
<div class="memproto"> |
| 546 |
<table class="mlabels"> |
| 547 |
<tr> |
| 548 |
<td class="mlabels-left"> |
| 549 |
<table class="memname"> |
| 550 |
<tr> |
| 551 |
<td class="memname">std::string Xapian::LatLongDistancePostingSource::serialise </td> |
| 552 |
<td>(</td> |
| 553 |
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td> |
| 554 |
<td> const</td> |
| 555 |
</tr> |
| 556 |
</table> |
| 557 |
</td> |
| 558 |
<td class="mlabels-right"> |
| 559 |
<span class="mlabels"><span class="mlabel virtual">virtual</span></span> </td> |
| 560 |
</tr> |
| 561 |
</table> |
| 562 |
</div><div class="memdoc"> |
| 563 |
|
| 564 |
<p>Serialise object parameters into a string. </p> |
| 565 |
<p>The serialised parameters should represent the configuration of the posting source, but need not (indeed, should not) represent the current iteration state.</p> |
| 566 |
<p>If you don't want to support the remote backend, you can use the default implementation which simply throws <a class="el" href="classXapian_1_1UnimplementedError.html" title="UnimplementedError indicates an attempt to use an unimplemented feature.">Xapian::UnimplementedError</a>. </p> |
| 567 |
|
| 568 |
<p>Reimplemented from <a class="el" href="classXapian_1_1PostingSource.html#a0ad6b98d6b5e79a37b7a1d7874725894">Xapian::PostingSource</a>.</p> |
| 569 |
|
| 570 |
</div> |
| 571 |
</div> |
| 572 |
<a id="a85e5437efbd9b9e016bc3cd12b41b0db" name="a85e5437efbd9b9e016bc3cd12b41b0db"></a> |
| 573 |
<h2 class="memtitle"><span class="permalink"><a href="#a85e5437efbd9b9e016bc3cd12b41b0db">◆ </a></span>skip_to()</h2> |
| 574 |
|
| 575 |
<div class="memitem"> |
| 576 |
<div class="memproto"> |
| 577 |
<table class="mlabels"> |
| 578 |
<tr> |
| 579 |
<td class="mlabels-left"> |
| 580 |
<table class="memname"> |
| 581 |
<tr> |
| 582 |
<td class="memname">void Xapian::LatLongDistancePostingSource::skip_to </td> |
| 583 |
<td>(</td> |
| 584 |
<td class="paramtype"><a class="el" href="namespaceXapian.html#ad8f7a78bc920532b7d2baa3281b33e2f">Xapian::docid</a></td> <td class="paramname"><span class="paramname"><em>did</em></span>, </td> |
| 585 |
</tr> |
| 586 |
<tr> |
| 587 |
<td class="paramkey"></td> |
| 588 |
<td></td> |
| 589 |
<td class="paramtype">double</td> <td class="paramname"><span class="paramname"><em>min_wt</em></span> )</td> |
| 590 |
</tr> |
| 591 |
</table> |
| 592 |
</td> |
| 593 |
<td class="mlabels-right"> |
| 594 |
<span class="mlabels"><span class="mlabel virtual">virtual</span></span> </td> |
| 595 |
</tr> |
| 596 |
</table> |
| 597 |
</div><div class="memdoc"> |
| 598 |
|
| 599 |
<p>Advance to the specified docid. </p> |
| 600 |
<p>If the specified docid isn't in the list, position ourselves on the first document after it (or <a class="el" href="classXapian_1_1ValuePostingSource.html#a53d851ba1e75670c28c9508921273dc0" title="Return true if the current position is past the last entry in this list.">at_end()</a> if no greater docids are present).</p> |
| 601 |
<p>If the current position is already the specified docid, this method will leave the position unmodified.</p> |
| 602 |
<p>If the specified docid is earlier than the current position, the behaviour is unspecified. A sensible behaviour would be to leave the current position unmodified, but it is also reasonable to move to the specified docid.</p> |
| 603 |
<p>The default implementation calls <a class="el" href="#a563dd69bf4113b73aa12335c3e282ae5" title="Advance the current position to the next matching document.">next()</a> repeatedly, which works but <a class="el" href="#a85e5437efbd9b9e016bc3cd12b41b0db" title="Advance to the specified docid.">skip_to()</a> can often be implemented much more efficiently.</p> |
| 604 |
<p><a class="el" href="namespaceXapian.html" title="The Xapian namespace contains public interfaces for the Xapian library.">Xapian</a> will always call <a class="el" href="#ac3bb27d2891a9f3a8a2ceee0eaa0e747" title="Set this PostingSource to the start of the list of postings.">init()</a> on a <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> before calling this for the first time.</p> |
| 605 |
<p>Note: in the case of a multi-database search, the docid specified is the docid in the single subdatabase relevant to this posting source. See the <em class="arg"><a class="el" href="#ac3bb27d2891a9f3a8a2ceee0eaa0e747" title="Set this PostingSource to the start of the list of postings.">init()</a></em> method for details.</p> |
| 606 |
<dl class="params"><dt>Parameters</dt><dd> |
| 607 |
<table class="params"> |
| 608 |
<tr><td class="paramname">did</td><td>The document id to advance to. </td></tr> |
| 609 |
<tr><td class="paramname">min_wt</td><td>The minimum weight contribution that is needed (this is just a hint which subclasses may ignore). </td></tr> |
| 610 |
</table> |
| 611 |
</dd> |
| 612 |
</dl> |
| 613 |
|
| 614 |
<p>Reimplemented from <a class="el" href="classXapian_1_1PostingSource.html#acf18a9328d8e46c3a759a3a120009607">Xapian::PostingSource</a>.</p> |
| 615 |
|
| 616 |
</div> |
| 617 |
</div> |
| 618 |
<a id="aa2f9978d2f71b3d5cadf395344dde790" name="aa2f9978d2f71b3d5cadf395344dde790"></a> |
| 619 |
<h2 class="memtitle"><span class="permalink"><a href="#aa2f9978d2f71b3d5cadf395344dde790">◆ </a></span>unserialise_with_registry()</h2> |
| 620 |
|
| 621 |
<div class="memitem"> |
| 622 |
<div class="memproto"> |
| 623 |
<table class="mlabels"> |
| 624 |
<tr> |
| 625 |
<td class="mlabels-left"> |
| 626 |
<table class="memname"> |
| 627 |
<tr> |
| 628 |
<td class="memname">LatLongDistancePostingSource * Xapian::LatLongDistancePostingSource::unserialise_with_registry </td> |
| 629 |
<td>(</td> |
| 630 |
<td class="paramtype">const std::string &</td> <td class="paramname"><span class="paramname"><em>serialised</em></span>, </td> |
| 631 |
</tr> |
| 632 |
<tr> |
| 633 |
<td class="paramkey"></td> |
| 634 |
<td></td> |
| 635 |
<td class="paramtype">const <a class="el" href="classXapian_1_1Registry.html">Registry</a> &</td> <td class="paramname"><span class="paramname"><em>registry</em></span> ) const</td> |
| 636 |
</tr> |
| 637 |
</table> |
| 638 |
</td> |
| 639 |
<td class="mlabels-right"> |
| 640 |
<span class="mlabels"><span class="mlabel virtual">virtual</span></span> </td> |
| 641 |
</tr> |
| 642 |
</table> |
| 643 |
</div><div class="memdoc"> |
| 644 |
|
| 645 |
<p>Create object given string serialisation returned by <a class="el" href="#a7c3687449188ea137dec58065906fc0f" title="Serialise object parameters into a string.">serialise()</a>. </p> |
| 646 |
<p>Note that the returned object will be deallocated by <a class="el" href="namespaceXapian.html" title="The Xapian namespace contains public interfaces for the Xapian library.">Xapian</a> after use with "delete". If you want to handle the deletion in a special way (for example when wrapping the <a class="el" href="namespaceXapian.html" title="The Xapian namespace contains public interfaces for the Xapian library.">Xapian</a> API for use from another language) then you can define a static <code>operator delete</code> method in your subclass as shown here: <a href="https://trac.xapian.org/ticket/554#comment:1">https://trac.xapian.org/ticket/554#comment:1</a></p> |
| 647 |
<p>This method is supplied with a <a class="el" href="classXapian_1_1Registry.html" title="Registry for user subclasses.">Registry</a> object, which can be used when unserialising objects contained within the posting source. The default implementation simply calls <a class="el" href="classXapian_1_1PostingSource.html#adf7161bbfff95fedf27640342672adc6" title="Create object given string serialisation returned by serialise().">unserialise()</a> which doesn't take the <a class="el" href="classXapian_1_1Registry.html" title="Registry for user subclasses.">Registry</a> object, so you do not need to implement this method unless you want to take advantage of the <a class="el" href="classXapian_1_1Registry.html" title="Registry for user subclasses.">Registry</a> object when unserialising.</p> |
| 648 |
<dl class="params"><dt>Parameters</dt><dd> |
| 649 |
<table class="params"> |
| 650 |
<tr><td class="paramname">serialised</td><td>A serialised instance of this <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> subclass. </td></tr> |
| 651 |
<tr><td class="paramname">registry</td><td>The <a class="el" href="classXapian_1_1Registry.html" title="Registry for user subclasses.">Xapian::Registry</a> object to use. </td></tr> |
| 652 |
</table> |
| 653 |
</dd> |
| 654 |
</dl> |
| 655 |
|
| 656 |
<p>Reimplemented from <a class="el" href="classXapian_1_1PostingSource.html#ae7bd73f7f8d6c07a732600a7ddf59060">Xapian::PostingSource</a>.</p> |
| 657 |
|
| 658 |
</div> |
| 659 |
</div> |
| 660 |
<hr/>The documentation for this class was generated from the following file:<ul> |
| 661 |
<li>xapian/<a class="el" href="geospatial_8h.html">geospatial.h</a></li> |
| 662 |
</ul> |
| 663 |
</div><!-- contents --> |
| 664 |
<!-- start footer part --> |
| 665 |
<hr class="footer"/><address class="footer"><small> |
| 666 |
Generated by <a href="https://www.doxygen.org/">Doxygen 1.15.0</a> |
| 667 |
</small></address> |
| 668 |
</body> |
| 669 |
</html> |