xapian-core  1.4.25
nearpostlist.h
Go to the documentation of this file.
1 
22 #ifndef XAPIAN_INCLUDED_NEARPOSTLIST_H
23 #define XAPIAN_INCLUDED_NEARPOSTLIST_H
24 
25 #include "selectpostlist.h"
26 #include <vector>
27 
38 class NearPostList : public SelectPostList {
40 
41  std::vector<PostList*> terms;
42 
44 
46  bool test_doc();
47 
48  public:
49  NearPostList(PostList *source_,
50  Xapian::termpos window_,
51  const std::vector<PostList*>::const_iterator &terms_begin,
52  const std::vector<PostList*>::const_iterator &terms_end);
53 
54  ~NearPostList();
55 
56  Xapian::termcount get_wdf() const;
57 
59 
61  const Xapian::Weight::Internal & stats) const;
62 
63  std::string get_description() const;
64 };
65 
66 #endif
TermFreqs get_termfreq_est_using_stats(const Xapian::Weight::Internal &stats) const
Get an estimate for the termfreq and reltermfreq, given the stats.
Abstract base class for postlists.
Definition: postlist.h:37
Xapian::termcount get_wdf() const
Return the wdf for the document at the current position.
Xapian::termpos window
Definition: nearpostlist.h:39
std::vector< PostList * > terms
Definition: nearpostlist.h:41
Parent class for classes which only return selected docs.
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
Definition: types.h:72
Postlist which matches terms occurring within a specified window.
Definition: nearpostlist.h:38
bool test_doc()
Test if the current document contains the terms within the window.
Definition: nearpostlist.cc:65
Class to hold statistics for a given collection.
NearPostList(PostList *source_, Xapian::termpos window_, const std::vector< PostList *>::const_iterator &terms_begin, const std::vector< PostList *>::const_iterator &terms_end)
Definition: nearpostlist.cc:36
Xapian::doccount get_termfreq_est() const
Get an estimate of the number of documents indexed by this term.
A postlist parent class for classes which only return selected docs from a source postlist (e...
The frequencies for a term.
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
Definition: types.h:38
std::string get_description() const
Return a string description of this object.
unsigned XAPIAN_TERMPOS_BASE_TYPE termpos
A term position within a document or query.
Definition: types.h:83
Abstract base class for iterating term positions in a document.
Definition: positionlist.h:31
PositionList ** poslists
Definition: nearpostlist.h:43