#include <phrasepostlist.h>
Inheritance diagram for PhrasePostList:
Public Member Functions | |
std::string | get_description () const |
Return a string description of this object. | |
Xapian::termcount | get_wdf () const |
Return the wdf for the document at the current position. | |
Xapian::doccount | get_termfreq_est () const |
Get an estimate of the number of documents indexed by this term. | |
PhrasePostList (PostList *source_, Xapian::termpos window_, std::vector< PostList * > terms_) | |
Private Member Functions | |
bool | test_doc () |
Check if terms form a phrase in the current doc. | |
bool | do_test (std::vector< PositionList * > &plists, Xapian::termcount i, Xapian::termcount min, Xapian::termcount max) |
Private Attributes | |
Xapian::termpos | window |
std::vector< PostList * > | terms |
This postlist returns a posting if and only if it is in all of the sub-postlists and all the terms occur IN THE GIVEN ORDER within a specified distance of each other somewhere in the document. The weight for a posting is the sum of the weights of the sub-postings.
Definition at line 73 of file phrasepostlist.h.
PhrasePostList::PhrasePostList | ( | PostList * | source_, | |
Xapian::termpos | window_, | |||
std::vector< PostList * > | terms_ | |||
) | [inline] |
bool PhrasePostList::test_doc | ( | ) | [private, virtual] |
Check if terms form a phrase in the current doc.
Implements SelectPostList.
Definition at line 163 of file phrasepostlist.cc.
References SelectPostList::at_end(), DEBUGCALL, DEBUGLINE, do_test(), RETURN, terms, and window.
bool PhrasePostList::do_test | ( | std::vector< PositionList * > & | plists, | |
Xapian::termcount | i, | |||
Xapian::termcount | min, | |||
Xapian::termcount | max | |||
) | [private] |
Definition at line 197 of file phrasepostlist.cc.
References AssertRel, SelectPostList::at_end(), DEBUGCALL, DEBUGLINE, SelectPostList::get_docid(), RETURN, and window.
Referenced by test_doc().
std::string PhrasePostList::get_description | ( | ) | const [virtual] |
Return a string description of this object.
Reimplemented from SelectPostList.
Definition at line 268 of file phrasepostlist.cc.
References Xapian::PostingIterator::Internal::get_description(), om_tostring(), SelectPostList::source, and window.
Xapian::termcount PhrasePostList::get_wdf | ( | ) | const [virtual] |
Return the wdf for the document at the current position.
The default implementation throws Xapian::UnimplementedError.
Reimplemented from Xapian::PostingIterator::Internal.
Definition at line 245 of file phrasepostlist.cc.
References terms.
Xapian::doccount PhrasePostList::get_termfreq_est | ( | ) | const [inline, virtual] |
Get an estimate of the number of documents indexed by this term.
It should always be true that: get_termfreq_min() <= get_termfreq_est() <= get_termfreq_max()
Implements Xapian::PostingIterator::Internal.
Definition at line 85 of file phrasepostlist.h.
References Xapian::PostingIterator::Internal::get_termfreq_est(), and SelectPostList::source.
Xapian::termpos PhrasePostList::window [private] |
Definition at line 75 of file phrasepostlist.h.
Referenced by do_test(), get_description(), PhrasePostList(), and test_doc().
std::vector<PostList *> PhrasePostList::terms [private] |
Definition at line 76 of file phrasepostlist.h.
Referenced by get_wdf(), PhrasePostList(), and test_doc().