xapian-core  2.0.0
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 
28 class EstimateOp;
29 class PostListTree;
30 
41 class NearPostList : public SelectPostList {
43 
44  std::vector<PostList*> terms;
45 
47 
49  bool test_doc();
50 
51  public:
52  NearPostList(PostList *source_,
53  EstimateOp* estimate_op_,
54  Xapian::termpos window_,
55  const std::vector<PostList*>::const_iterator &terms_begin,
56  const std::vector<PostList*>::const_iterator &terms_end,
57  PostListTree* pltree_);
58 
59  ~NearPostList();
60 
61  Xapian::termcount get_wdf() const;
62 
63  std::string get_description() const;
64 };
65 
66 #endif
Class for estimating the total number of matching documents.
Definition: estimateop.h:64
Postlist which matches terms occurring within a specified window.
Definition: nearpostlist.h:41
NearPostList(PostList *source_, EstimateOp *estimate_op_, Xapian::termpos window_, const std::vector< PostList * >::const_iterator &terms_begin, const std::vector< PostList * >::const_iterator &terms_end, PostListTree *pltree_)
Definition: nearpostlist.cc:37
Xapian::termpos window
Definition: nearpostlist.h:42
std::vector< PostList * > terms
Definition: nearpostlist.h:44
Xapian::termcount get_wdf() const
Return the wdf for the document at the current position.
std::string get_description() const
Return a string description of this object.
PositionList ** poslists
Definition: nearpostlist.h:46
bool test_doc()
Test if the current document contains the terms within the window.
Definition: nearpostlist.cc:75
Base class for classes which filter another PostList.
Abstract base class for postlists.
Definition: postlist.h:40
Abstract base class for iterating term positions in a document.
Definition: positionlist.h:32
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
Definition: types.h:64
unsigned XAPIAN_TERMPOS_BASE_TYPE termpos
A term position within a document or query.
Definition: types.h:75
Base class for classes which filter another PostList.