File: classXapian_1_1ValuePostingSource.html

package info (click to toggle)
xapian-core 1.2.12-2%2Bdeb7u1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 19,180 kB
  • sloc: cpp: 100,708; sh: 11,201; ansic: 8,177; makefile: 813; perl: 758; python: 40
file content (526 lines) | stat: -rw-r--r-- 41,994 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Xapian: API Documentation: xapian-core: Xapian::ValuePostingSource Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#ffffff">
<!-- Generated by Doxygen 1.5.9 -->
<script type="text/javascript">
<!--
function changeDisplayState (e){
  var num=this.id.replace(/[^[0-9]/g,'');
  var button=this.firstChild;
  var sectionDiv=document.getElementById('dynsection'+num);
  if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
    sectionDiv.style.display='block';
    button.src='open.gif';
  }else{
    sectionDiv.style.display='none';
    button.src='closed.gif';
  }
}
function initDynSections(){
  var divs=document.getElementsByTagName('div');
  var sectionCounter=1;
  for(var i=0;i<divs.length-1;i++){
    if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
      var header=divs[i];
      var section=divs[i+1];
      var button=header.firstChild;
      if (button!='IMG'){
        divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
        button=document.createElement('img');
        divs[i].insertBefore(button,divs[i].firstChild);
      }
      header.style.cursor='pointer';
      header.onclick=changeDisplayState;
      header.id='dynheader'+sectionCounter;
      button.src='closed.gif';
      section.id='dynsection'+sectionCounter;
      section.style.display='none';
      section.style.marginLeft='14px';
      sectionCounter++;
    }
  }
}
window.onload = initDynSections;
-->
</script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="namespaceXapian.html">Xapian</a>::<a class="el" href="classXapian_1_1ValuePostingSource.html">ValuePostingSource</a>
  </div>
</div>
<div class="contents">
<h1>Xapian::ValuePostingSource Class Reference</h1><!-- doxytag: class="Xapian::ValuePostingSource" --><!-- doxytag: inherits="Xapian::PostingSource" -->A posting source which generates weights from a value slot.  
<a href="#_details">More...</a>
<p>
<div class="dynheader">
Inheritance diagram for Xapian::ValuePostingSource:</div>
<div class="dynsection">
<p><center><img src="classXapian_1_1ValuePostingSource__inherit__graph.png" border="0" usemap="#Xapian_1_1ValuePostingSource__inherit__map" alt="Inheritance graph"></center>
<map name="Xapian_1_1ValuePostingSource__inherit__map">
<area shape="rect" href="classXapian_1_1ValueMapPostingSource.html" title="A posting source which looks up weights in a map using values as the key." alt="" coords="5,161,232,188"><area shape="rect" href="classXapian_1_1ValueWeightPostingSource.html" title="A posting source which reads weights from a value slot." alt="" coords="256,161,496,188"><area shape="rect" href="classXapian_1_1PostingSource.html" title="Base class which provides an &quot;external&quot; source of postings." alt="" coords="165,7,328,33"><area shape="rect" href="classXapian_1_1DecreasingValueWeightPostingSource.html" title="Read weights from a value which is known to decrease as docid increases." alt="" coords="220,239,532,265"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>

<p>
<a href="classXapian_1_1ValuePostingSource-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#ccbffc6b7f573e9a41fc234a410a1ec3">ValuePostingSource</a> (<a class="el" href="namespaceXapian.html#94a899651fa920c72ffa9635bde630ea">Xapian::valueno</a> slot_)</td></tr>

<tr><td class="mdescLeft">&nbsp;</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>.  <a href="#ccbffc6b7f573e9a41fc234a410a1ec3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="namespaceXapian.html#7f30aa95f0c42b117dafaf66ba24241d">Xapian::doccount</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#73743991ef0f5a2818d56c94e9e019f4">get_termfreq_min</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A lower bound on the number of documents this object can return.  <a href="#73743991ef0f5a2818d56c94e9e019f4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="namespaceXapian.html#7f30aa95f0c42b117dafaf66ba24241d">Xapian::doccount</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#dd937d003f986ff60119bffbac277d76">get_termfreq_est</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">An estimate of the number of documents this object can return.  <a href="#dd937d003f986ff60119bffbac277d76"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="namespaceXapian.html#7f30aa95f0c42b117dafaf66ba24241d">Xapian::doccount</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#c71b845c832955fe708d9ad6dbcf87e5">get_termfreq_max</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">An upper bound on the number of documents this object can return.  <a href="#c71b845c832955fe708d9ad6dbcf87e5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#87b22aac8422f80124b50a456d1d85b0">next</a> (<a class="el" href="namespaceXapian.html#cac12803afc9e24ee5141c119acb8884">Xapian::weight</a> min_wt)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Advance the current position to the next matching document.  <a href="#87b22aac8422f80124b50a456d1d85b0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#f11095a4355f96d7bc12074a5a91cd93">skip_to</a> (<a class="el" href="namespaceXapian.html#8fa9094bebe1256a7be935a5ede87a64">Xapian::docid</a> min_docid, <a class="el" href="namespaceXapian.html#cac12803afc9e24ee5141c119acb8884">Xapian::weight</a> min_wt)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Advance to the specified docid.  <a href="#f11095a4355f96d7bc12074a5a91cd93"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#71868e54627098425820f7a76e259197">check</a> (<a class="el" href="namespaceXapian.html#8fa9094bebe1256a7be935a5ede87a64">Xapian::docid</a> min_docid, <a class="el" href="namespaceXapian.html#cac12803afc9e24ee5141c119acb8884">Xapian::weight</a> min_wt)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check if the specified docid occurs.  <a href="#71868e54627098425820f7a76e259197"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#4bb7ea314dbd569f90f89731204cdc40">at_end</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return true if the current position is past the last entry in this list.  <a href="#4bb7ea314dbd569f90f89731204cdc40"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="namespaceXapian.html#8fa9094bebe1256a7be935a5ede87a64">Xapian::docid</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#6507d4d1a4119058890d92dfad53f40d">get_docid</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the current docid.  <a href="#6507d4d1a4119058890d92dfad53f40d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#764328b2a7085e24393a94eb1d2b91e0">init</a> (const <a class="el" href="classXapian_1_1Database.html">Database</a> &amp;db_)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set this <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an &quot;external&quot; source of postings.">PostingSource</a> to the start of the list of postings.  <a href="#764328b2a7085e24393a94eb1d2b91e0"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="24ed690d4249ce0929a1a1ff236124f1"></a><!-- doxytag: member="Xapian::ValuePostingSource::db" ref="24ed690d4249ce0929a1a1ff236124f1" args="" -->
<a class="el" href="classXapian_1_1Database.html">Xapian::Database</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#24ed690d4249ce0929a1a1ff236124f1">db</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The database we're reading values from. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="efd7cda358e1dc81ccd72bfe7b0f940c"></a><!-- doxytag: member="Xapian::ValuePostingSource::slot" ref="efd7cda358e1dc81ccd72bfe7b0f940c" args="" -->
<a class="el" href="namespaceXapian.html#94a899651fa920c72ffa9635bde630ea">Xapian::valueno</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#efd7cda358e1dc81ccd72bfe7b0f940c">slot</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The slot we're reading values from. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ddc0e75dc4ad4cfcf1f2d807bc3b32c4"></a><!-- doxytag: member="Xapian::ValuePostingSource::value_it" ref="ddc0e75dc4ad4cfcf1f2d807bc3b32c4" args="" -->
<a class="el" href="classXapian_1_1ValueIterator.html">Xapian::ValueIterator</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#ddc0e75dc4ad4cfcf1f2d807bc3b32c4">value_it</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Value stream iterator. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f961be7d3dcc2eb8b9e70744ce2c7597"></a><!-- doxytag: member="Xapian::ValuePostingSource::started" ref="f961be7d3dcc2eb8b9e70744ce2c7597" args="" -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#f961be7d3dcc2eb8b9e70744ce2c7597">started</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flag indicating if we've started (true if we have). <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="namespaceXapian.html#7f30aa95f0c42b117dafaf66ba24241d">Xapian::doccount</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#30f64f26a6faddc3f24b8c00e2ba5d0b">termfreq_min</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A lower bound on the term frequency.  <a href="#30f64f26a6faddc3f24b8c00e2ba5d0b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="namespaceXapian.html#7f30aa95f0c42b117dafaf66ba24241d">Xapian::doccount</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#b9b4cc08e1ba2da73f059b2312ae3986">termfreq_est</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">An estimate of the term frequency.  <a href="#b9b4cc08e1ba2da73f059b2312ae3986"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="namespaceXapian.html#7f30aa95f0c42b117dafaf66ba24241d">Xapian::doccount</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValuePostingSource.html#3a7be278e6615876d57a254a60826c2f">termfreq_max</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">An upper bound on the term frequency.  <a href="#3a7be278e6615876d57a254a60826c2f"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A posting source which generates weights from a value slot. 
<p>
This is a base class for classes which generate weights using values stored in the specified slot. For example, <a class="el" href="classXapian_1_1ValueWeightPostingSource.html" title="A posting source which reads weights from a value slot.">ValueWeightPostingSource</a> uses sortable_unserialise to convert values directly to weights.<p>
The upper bound on the weight returned is set to DBL_MAX. Subclasses should call <a class="el" href="classXapian_1_1PostingSource.html#0643cf1dfb1c3ed2dd1cf5ecfe3f3a10" title="Set an upper bound on what get_weight() can return from now on.">set_maxweight()</a> in their <a class="el" href="classXapian_1_1ValuePostingSource.html#764328b2a7085e24393a94eb1d2b91e0" title="Set this PostingSource to the start of the list of postings.">init()</a> methods after calling <a class="el" href="classXapian_1_1ValuePostingSource.html#764328b2a7085e24393a94eb1d2b91e0" title="Set this PostingSource to the start of the list of postings.">ValuePostingSource::init()</a> if they know a tighter bound on the weight. <hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="ccbffc6b7f573e9a41fc234a410a1ec3"></a><!-- doxytag: member="Xapian::ValuePostingSource::ValuePostingSource" ref="ccbffc6b7f573e9a41fc234a410a1ec3" args="(Xapian::valueno slot_)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Xapian::ValuePostingSource::ValuePostingSource           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceXapian.html#94a899651fa920c72ffa9635bde630ea">Xapian::valueno</a>&nbsp;</td>
          <td class="paramname"> <em>slot_</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Construct a <a class="el" href="classXapian_1_1ValuePostingSource.html" title="A posting source which generates weights from a value slot.">ValuePostingSource</a>. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>slot_</em>&nbsp;</td><td>The value slot to read values from. </td></tr>
  </table>
</dl>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="4bb7ea314dbd569f90f89731204cdc40"></a><!-- doxytag: member="Xapian::ValuePostingSource::at_end" ref="4bb7ea314dbd569f90f89731204cdc40" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Xapian::ValuePostingSource::at_end           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return true if the current position is past the last entry in this list. 
<p>
At least one of <em><a class="el" href="classXapian_1_1ValuePostingSource.html#87b22aac8422f80124b50a456d1d85b0" title="Advance the current position to the next matching document.">next()</a></em>, <em><a class="el" href="classXapian_1_1ValuePostingSource.html#f11095a4355f96d7bc12074a5a91cd93" title="Advance to the specified docid.">skip_to()</a></em> or <em><a class="el" href="classXapian_1_1ValuePostingSource.html#71868e54627098425820f7a76e259197" title="Check if the specified docid occurs.">check()</a></em> will be called before this method is first called. 
<p>Implements <a class="el" href="classXapian_1_1PostingSource.html#98831c9fdea1599f588cd9fef51bbeb5">Xapian::PostingSource</a>.</p>

</div>
</div><p>
<a class="anchor" name="71868e54627098425820f7a76e259197"></a><!-- doxytag: member="Xapian::ValuePostingSource::check" ref="71868e54627098425820f7a76e259197" args="(Xapian::docid min_docid, Xapian::weight min_wt)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Xapian::ValuePostingSource::check           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceXapian.html#8fa9094bebe1256a7be935a5ede87a64">Xapian::docid</a>&nbsp;</td>
          <td class="paramname"> <em>did</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceXapian.html#cac12803afc9e24ee5141c119acb8884">Xapian::weight</a>&nbsp;</td>
          <td class="paramname"> <em>min_wt</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Check if the specified docid occurs. 
<p>
The caller is required to ensure that the specified document id <em>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>
<ul>
<li>return true, having moved to a definite position (including "at_end"), which must be the same position as <a class="el" href="classXapian_1_1ValuePostingSource.html#f11095a4355f96d7bc12074a5a91cd93" title="Advance to the specified docid.">skip_to()</a> would have moved to.</li></ul>
<p>
or<p>
<ul>
<li>return false, having moved to an "indeterminate" position, such that a subsequent call to <a class="el" href="classXapian_1_1ValuePostingSource.html#87b22aac8422f80124b50a456d1d85b0" title="Advance the current position to the next matching document.">next()</a> or <a class="el" href="classXapian_1_1ValuePostingSource.html#f11095a4355f96d7bc12074a5a91cd93" title="Advance to the specified docid.">skip_to()</a> will move to the next matching position after <em>did</em>.</li></ul>
<p>
Generally, this method should act like <a class="el" href="classXapian_1_1ValuePostingSource.html#f11095a4355f96d7bc12074a5a91cd93" title="Advance to the specified docid.">skip_to()</a> and return true if that can be done at little extra cost.<p>
Otherwise it should simply check if a particular docid is present, returning true if it is, and false if it isn't.<p>
The default implementation calls <a class="el" href="classXapian_1_1ValuePostingSource.html#f11095a4355f96d7bc12074a5a91cd93" title="Advance to the specified docid.">skip_to()</a> and always returns true.<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="classXapian_1_1ValuePostingSource.html#764328b2a7085e24393a94eb1d2b91e0" 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 &quot;external&quot; source of postings.">PostingSource</a> before calling this for the first time.<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><a class="el" href="classXapian_1_1ValuePostingSource.html#764328b2a7085e24393a94eb1d2b91e0" title="Set this PostingSource to the start of the list of postings.">init()</a></em> method for details.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>did</em>&nbsp;</td><td>The document id to check. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>min_wt</em>&nbsp;</td><td>The minimum weight contribution that is needed (this is just a hint which subclasses may ignore). </td></tr>
  </table>
</dl>

<p>Reimplemented from <a class="el" href="classXapian_1_1PostingSource.html#92098dee93d09781bb5ad48e86434873">Xapian::PostingSource</a>.</p>

<p>Reimplemented in <a class="el" href="classXapian_1_1DecreasingValueWeightPostingSource.html#3ae07f1c25d3b71f437a7cb63a342d5c">Xapian::DecreasingValueWeightPostingSource</a>.</p>

</div>
</div><p>
<a class="anchor" name="6507d4d1a4119058890d92dfad53f40d"></a><!-- doxytag: member="Xapian::ValuePostingSource::get_docid" ref="6507d4d1a4119058890d92dfad53f40d" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceXapian.html#8fa9094bebe1256a7be935a5ede87a64">Xapian::docid</a> Xapian::ValuePostingSource::get_docid           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return the current docid. 
<p>
This method may assume that it will only be called when there is a "current document". See <em><a class="el" href="classXapian_1_1PostingSource.html#2e7637a323a90bea45f2dc68c916ea00" title="Return the weight contribution for the current document.">get_weight()</a></em> for details.<p>
Note: in the case of a multi-database search, the returned docid should be in the single subdatabase relevant to this posting source. See the <em><a class="el" href="classXapian_1_1ValuePostingSource.html#764328b2a7085e24393a94eb1d2b91e0" title="Set this PostingSource to the start of the list of postings.">init()</a></em> method for details. 
<p>Implements <a class="el" href="classXapian_1_1PostingSource.html#7b1bd1fcd07d69204f70155588ae544a">Xapian::PostingSource</a>.</p>

</div>
</div><p>
<a class="anchor" name="dd937d003f986ff60119bffbac277d76"></a><!-- doxytag: member="Xapian::ValuePostingSource::get_termfreq_est" ref="dd937d003f986ff60119bffbac277d76" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceXapian.html#7f30aa95f0c42b117dafaf66ba24241d">Xapian::doccount</a> Xapian::ValuePostingSource::get_termfreq_est           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
An estimate of the number of documents this object can return. 
<p>
It must always be true that:<p>
<a class="el" href="classXapian_1_1ValuePostingSource.html#73743991ef0f5a2818d56c94e9e019f4" title="A lower bound on the number of documents this object can return.">get_termfreq_min()</a> &lt;= <a class="el" href="classXapian_1_1ValuePostingSource.html#dd937d003f986ff60119bffbac277d76" title="An estimate of the number of documents this object can return.">get_termfreq_est()</a> &lt;= <a class="el" href="classXapian_1_1ValuePostingSource.html#c71b845c832955fe708d9ad6dbcf87e5" title="An upper bound on the number of documents this object can return.">get_termfreq_max()</a><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="classXapian_1_1ValuePostingSource.html#764328b2a7085e24393a94eb1d2b91e0" 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 &quot;external&quot; source of postings.">PostingSource</a> before calling this for the first time. 
<p>Implements <a class="el" href="classXapian_1_1PostingSource.html#0d67eda5783f82951d6c56ad7ff4205b">Xapian::PostingSource</a>.</p>

</div>
</div><p>
<a class="anchor" name="c71b845c832955fe708d9ad6dbcf87e5"></a><!-- doxytag: member="Xapian::ValuePostingSource::get_termfreq_max" ref="c71b845c832955fe708d9ad6dbcf87e5" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceXapian.html#7f30aa95f0c42b117dafaf66ba24241d">Xapian::doccount</a> Xapian::ValuePostingSource::get_termfreq_max           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
An upper bound on the number of documents this object can return. 
<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="classXapian_1_1ValuePostingSource.html#764328b2a7085e24393a94eb1d2b91e0" 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 &quot;external&quot; source of postings.">PostingSource</a> before calling this for the first time. 
<p>Implements <a class="el" href="classXapian_1_1PostingSource.html#17de27c84a052c51d62ad498151a4cab">Xapian::PostingSource</a>.</p>

</div>
</div><p>
<a class="anchor" name="73743991ef0f5a2818d56c94e9e019f4"></a><!-- doxytag: member="Xapian::ValuePostingSource::get_termfreq_min" ref="73743991ef0f5a2818d56c94e9e019f4" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceXapian.html#7f30aa95f0c42b117dafaf66ba24241d">Xapian::doccount</a> Xapian::ValuePostingSource::get_termfreq_min           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
A lower bound on the number of documents this object can return. 
<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="classXapian_1_1ValuePostingSource.html#764328b2a7085e24393a94eb1d2b91e0" 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 &quot;external&quot; source of postings.">PostingSource</a> before calling this for the first time. 
<p>Implements <a class="el" href="classXapian_1_1PostingSource.html#5ecf450314e8b266eb9c8fae78e141d3">Xapian::PostingSource</a>.</p>

</div>
</div><p>
<a class="anchor" name="764328b2a7085e24393a94eb1d2b91e0"></a><!-- doxytag: member="Xapian::ValuePostingSource::init" ref="764328b2a7085e24393a94eb1d2b91e0" args="(const Database &amp;db_)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Xapian::ValuePostingSource::init           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classXapian_1_1Database.html">Database</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>db</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set this <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an &quot;external&quot; source of postings.">PostingSource</a> to the start of the list of postings. 
<p>
This is called automatically by the matcher prior to each query being processed.<p>
If a <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an &quot;external&quot; source of postings.">PostingSource</a> is used for multiple searches, <em><a class="el" href="classXapian_1_1ValuePostingSource.html#764328b2a7085e24393a94eb1d2b91e0" 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>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>db</em>&nbsp;</td><td>The database which the <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an &quot;external&quot; source of postings.">PostingSource</a> should iterate through.</td></tr>
  </table>
</dl>
Note: the database supplied to this method must not be modified: in particular, the reopen() method should not be called on it.<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 &quot;external&quot; source of postings.">PostingSource</a> will be used for each database (the separate PostingSources will be obtained using <em><a class="el" href="classXapian_1_1PostingSource.html#ecd88a39155ec5e04c752360b657f315" title="Clone the posting source.">clone()</a></em>), and each <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an &quot;external&quot; source of postings.">PostingSource</a> will be passed one of the sub-databases as the <em>db</em> parameter here. The <em>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 &quot;external&quot; source of postings.">PostingSource</a> refer to docids in that single database, rather than in the multi-database. 
<p>Implements <a class="el" href="classXapian_1_1PostingSource.html#81d793170b496022488c15c3508979b5">Xapian::PostingSource</a>.</p>

<p>Reimplemented in <a class="el" href="classXapian_1_1ValueWeightPostingSource.html#c3844351e28448d1de38fe089d626db4">Xapian::ValueWeightPostingSource</a>, <a class="el" href="classXapian_1_1DecreasingValueWeightPostingSource.html#abbd9d95d77e2aa947377c44d1bb733c">Xapian::DecreasingValueWeightPostingSource</a>, and <a class="el" href="classXapian_1_1ValueMapPostingSource.html#e76de9cb534e96b7a0cc827d89eea8fc">Xapian::ValueMapPostingSource</a>.</p>

</div>
</div><p>
<a class="anchor" name="87b22aac8422f80124b50a456d1d85b0"></a><!-- doxytag: member="Xapian::ValuePostingSource::next" ref="87b22aac8422f80124b50a456d1d85b0" args="(Xapian::weight min_wt)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Xapian::ValuePostingSource::next           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceXapian.html#cac12803afc9e24ee5141c119acb8884">Xapian::weight</a>&nbsp;</td>
          <td class="paramname"> <em>min_wt</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Advance the current position to the next matching document. 
<p>
The <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an &quot;external&quot; source of postings.">PostingSource</a> starts before the first entry in the list, so <a class="el" href="classXapian_1_1ValuePostingSource.html#87b22aac8422f80124b50a456d1d85b0" title="Advance the current position to the next matching document.">next()</a> must be called before any methods which need the context of the current position.<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="classXapian_1_1ValuePostingSource.html#764328b2a7085e24393a94eb1d2b91e0" 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 &quot;external&quot; source of postings.">PostingSource</a> before calling this for the first time.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>min_wt</em>&nbsp;</td><td>The minimum weight contribution that is needed (this is just a hint which subclasses may ignore). </td></tr>
  </table>
</dl>

<p>Implements <a class="el" href="classXapian_1_1PostingSource.html#fd0261e7b428c2a25245da07170e9635">Xapian::PostingSource</a>.</p>

<p>Reimplemented in <a class="el" href="classXapian_1_1DecreasingValueWeightPostingSource.html#ef2944c8ef7812185907af383a3747f2">Xapian::DecreasingValueWeightPostingSource</a>.</p>

</div>
</div><p>
<a class="anchor" name="f11095a4355f96d7bc12074a5a91cd93"></a><!-- doxytag: member="Xapian::ValuePostingSource::skip_to" ref="f11095a4355f96d7bc12074a5a91cd93" args="(Xapian::docid min_docid, Xapian::weight min_wt)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Xapian::ValuePostingSource::skip_to           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceXapian.html#8fa9094bebe1256a7be935a5ede87a64">Xapian::docid</a>&nbsp;</td>
          <td class="paramname"> <em>did</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceXapian.html#cac12803afc9e24ee5141c119acb8884">Xapian::weight</a>&nbsp;</td>
          <td class="paramname"> <em>min_wt</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Advance to the specified docid. 
<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#4bb7ea314dbd569f90f89731204cdc40" 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>
If the current position is already the specified docid, this method will leave the position unmodified.<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>
The default implementation calls <a class="el" href="classXapian_1_1ValuePostingSource.html#87b22aac8422f80124b50a456d1d85b0" title="Advance the current position to the next matching document.">next()</a> repeatedly, which works but <a class="el" href="classXapian_1_1ValuePostingSource.html#f11095a4355f96d7bc12074a5a91cd93" title="Advance to the specified docid.">skip_to()</a> can often be implemented much more efficiently.<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="classXapian_1_1ValuePostingSource.html#764328b2a7085e24393a94eb1d2b91e0" 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 &quot;external&quot; source of postings.">PostingSource</a> before calling this for the first time.<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><a class="el" href="classXapian_1_1ValuePostingSource.html#764328b2a7085e24393a94eb1d2b91e0" title="Set this PostingSource to the start of the list of postings.">init()</a></em> method for details.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>did</em>&nbsp;</td><td>The document id to advance to. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>min_wt</em>&nbsp;</td><td>The minimum weight contribution that is needed (this is just a hint which subclasses may ignore). </td></tr>
  </table>
</dl>

<p>Reimplemented from <a class="el" href="classXapian_1_1PostingSource.html#02e3f5e29a0605d7f9e0a09decbdd9bf">Xapian::PostingSource</a>.</p>

<p>Reimplemented in <a class="el" href="classXapian_1_1DecreasingValueWeightPostingSource.html#e32da549e3042739f2954233c7a9bb3c">Xapian::DecreasingValueWeightPostingSource</a>.</p>

</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="b9b4cc08e1ba2da73f059b2312ae3986"></a><!-- doxytag: member="Xapian::ValuePostingSource::termfreq_est" ref="b9b4cc08e1ba2da73f059b2312ae3986" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceXapian.html#7f30aa95f0c42b117dafaf66ba24241d">Xapian::doccount</a> <a class="el" href="classXapian_1_1ValuePostingSource.html#b9b4cc08e1ba2da73f059b2312ae3986">Xapian::ValuePostingSource::termfreq_est</a><code> [protected]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
An estimate of the term frequency. 
<p>
Subclasses should set this if they are overriding the <a class="el" href="classXapian_1_1ValuePostingSource.html#87b22aac8422f80124b50a456d1d85b0" title="Advance the current position to the next matching document.">next()</a>, <a class="el" href="classXapian_1_1ValuePostingSource.html#f11095a4355f96d7bc12074a5a91cd93" title="Advance to the specified docid.">skip_to()</a> or <a class="el" href="classXapian_1_1ValuePostingSource.html#71868e54627098425820f7a76e259197" title="Check if the specified docid occurs.">check()</a> methods. 
</div>
</div><p>
<a class="anchor" name="3a7be278e6615876d57a254a60826c2f"></a><!-- doxytag: member="Xapian::ValuePostingSource::termfreq_max" ref="3a7be278e6615876d57a254a60826c2f" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceXapian.html#7f30aa95f0c42b117dafaf66ba24241d">Xapian::doccount</a> <a class="el" href="classXapian_1_1ValuePostingSource.html#3a7be278e6615876d57a254a60826c2f">Xapian::ValuePostingSource::termfreq_max</a><code> [protected]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
An upper bound on the term frequency. 
<p>
Subclasses should set this if they are overriding the <a class="el" href="classXapian_1_1ValuePostingSource.html#87b22aac8422f80124b50a456d1d85b0" title="Advance the current position to the next matching document.">next()</a>, <a class="el" href="classXapian_1_1ValuePostingSource.html#f11095a4355f96d7bc12074a5a91cd93" title="Advance to the specified docid.">skip_to()</a> or <a class="el" href="classXapian_1_1ValuePostingSource.html#71868e54627098425820f7a76e259197" title="Check if the specified docid occurs.">check()</a> methods. 
</div>
</div><p>
<a class="anchor" name="30f64f26a6faddc3f24b8c00e2ba5d0b"></a><!-- doxytag: member="Xapian::ValuePostingSource::termfreq_min" ref="30f64f26a6faddc3f24b8c00e2ba5d0b" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceXapian.html#7f30aa95f0c42b117dafaf66ba24241d">Xapian::doccount</a> <a class="el" href="classXapian_1_1ValuePostingSource.html#30f64f26a6faddc3f24b8c00e2ba5d0b">Xapian::ValuePostingSource::termfreq_min</a><code> [protected]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
A lower bound on the term frequency. 
<p>
Subclasses should set this if they are overriding the <a class="el" href="classXapian_1_1ValuePostingSource.html#87b22aac8422f80124b50a456d1d85b0" title="Advance the current position to the next matching document.">next()</a>, <a class="el" href="classXapian_1_1ValuePostingSource.html#f11095a4355f96d7bc12074a5a91cd93" title="Advance to the specified docid.">skip_to()</a> or <a class="el" href="classXapian_1_1ValuePostingSource.html#71868e54627098425820f7a76e259197" title="Check if the specified docid occurs.">check()</a> methods to return fewer documents. 
</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li>xapian/<a class="el" href="postingsource_8h.html">postingsource.h</a></ul>
</div>
<hr>
<address><small>
Documentation for Xapian (version 1.2.12).<br>
Generated on 27 Jun 2012 by
<a href="http://www.doxygen.org/">Doxygen 1.5.9</a>.
</small></address>
</body>
</html>