xapian-core  1.4.25
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
NetworkPostList Class Reference

A postlist in a remote database. More...

#include <net_postlist.h>

+ Inheritance diagram for NetworkPostList:
+ Collaboration diagram for NetworkPostList:

Public Member Functions

 NetworkPostList (Xapian::Internal::intrusive_ptr< const RemoteDatabase > db_, const string &term_)
 Constructor. More...
 
Xapian::doccount get_termfreq () const
 Get number of documents indexed by this term. More...
 
Xapian::docid get_docid () const
 Get the current document ID. More...
 
Xapian::termcount get_doclength () const
 Get the length of the current document. More...
 
Xapian::termcount get_unique_terms () const
 Get the number of unique terms in the current document. More...
 
Xapian::termcount get_wdf () const
 Get the Within Document Frequency of the term in the current document. More...
 
PositionListopen_position_list () const
 Read the position list for the term in the current document and return a pointer to it (not owned by the PostList). More...
 
PostListnext (double)
 Move to the next document in the postlist (the weight parameter is ignored). More...
 
PostListskip_to (Xapian::docid did, double weight)
 Skip forward to the next document with document ID >= the supplied document ID (the weight parameter is ignored). More...
 
bool at_end () const
 Return true if and only if we've moved off the end of the list. More...
 
Xapian::termcount get_wdf_upper_bound () const
 
string get_description () const
 Get a description of the postlist. More...
 
- Public Member Functions inherited from LeafPostList
 ~LeafPostList ()
 
void set_termweight (const Xapian::Weight *weight_)
 Set the weighting scheme to use during matching. More...
 
double resolve_lazy_termweight (Xapian::Weight *weight_, Xapian::Weight::Internal *stats, Xapian::termcount qlen, Xapian::termcount wqf, double factor)
 
Xapian::doccount get_termfreq_min () const
 Get a lower bound on the number of documents indexed by this term. More...
 
Xapian::doccount get_termfreq_max () const
 Get an upper bound on the number of documents indexed by this term. More...
 
Xapian::doccount get_termfreq_est () const
 Get an estimate of the number of documents indexed by this term. More...
 
double get_maxweight () const
 Return an upper bound on what get_weight() can return. More...
 
double get_weight () const
 Return the weight contribution for the current position. More...
 
double recalc_maxweight ()
 Recalculate the upper bound on what get_weight() can return. More...
 
TermFreqs get_termfreq_est_using_stats (const Xapian::Weight::Internal &stats) const
 Get an estimate for the termfreq and reltermfreq, given the stats. More...
 
Xapian::termcount count_matching_subqs () const
 Count the number of leaf subqueries which match at the current position. More...
 
void gather_position_lists (OrPositionList *orposlist)
 Gather PositionList* objects for a subtree. More...
 
virtual LeafPostListopen_nearby_postlist (const std::string &term_) const
 Open another postlist from the same database. More...
 
void set_term (const std::string &term_)
 Set the term name. More...
 
- Public Member Functions inherited from Xapian::PostingIterator::Internal
virtual ~Internal ()
 We have virtual methods and want to be able to delete derived classes using a pointer to the base class, so we need a virtual destructor. More...
 
virtual const std::string * get_sort_key () const
 
virtual const std::string * get_collapse_key () const
 If the collapse key is already known, return it. More...
 
virtual PositionListread_position_list ()
 Read the position list for the term in the current document and return a pointer to it (owned by the PostList). More...
 
virtual Internalcheck (Xapian::docid did, double w_min, bool &valid)
 Check if the specified docid occurs in this postlist. More...
 
Internalnext ()
 Advance the current position to the next document in the postlist. More...
 
Internalskip_to (Xapian::docid did)
 Skip forward to the specified docid. More...
 
- Public Member Functions inherited from Xapian::Internal::intrusive_base
 intrusive_base ()
 Construct with no references. More...
 

Private Member Functions

void append_posting (const string &serialised)
 Append a posting to the end of the postlist. More...
 

Private Attributes

Xapian::Internal::intrusive_ptr< const RemoteDatabasedb
 
string postings
 
bool started
 
const char * pos
 
const char * pos_end
 
Xapian::docid lastdocid
 
Xapian::termcount lastwdf
 
Xapian::doccount termfreq
 

Friends

class RemoteDatabase
 

Additional Inherited Members

- Public Attributes inherited from Xapian::Internal::intrusive_base
unsigned _refs
 Reference count. More...
 
- Protected Member Functions inherited from LeafPostList
 LeafPostList (const std::string &term_)
 Only constructable as a base class for derived classes. More...
 
- Protected Member Functions inherited from Xapian::PostingIterator::Internal
 Internal ()
 Only constructable as a base class for derived classes. More...
 
- Protected Attributes inherited from LeafPostList
const Xapian::Weightweight
 
bool need_doclength
 
bool need_unique_terms
 
std::string term
 The term name for this postlist (empty for an alldocs postlist). More...
 

Detailed Description

A postlist in a remote database.

Definition at line 36 of file net_postlist.h.

Constructor & Destructor Documentation

◆ NetworkPostList()

NetworkPostList::NetworkPostList ( Xapian::Internal::intrusive_ptr< const RemoteDatabase db_,
const string &  term_ 
)
inline

Member Function Documentation

◆ append_posting()

void NetworkPostList::append_posting ( const string &  serialised)
inlineprivate

Append a posting to the end of the postlist.

Definition at line 52 of file net_postlist.h.

References Assert.

Referenced by RemoteDatabase::read_post_list().

◆ at_end()

bool NetworkPostList::at_end ( ) const
virtual

Return true if and only if we've moved off the end of the list.

Implements Xapian::PostingIterator::Internal.

Definition at line 102 of file net_postlist.cc.

◆ get_description()

string NetworkPostList::get_description ( ) const
virtual

Get a description of the postlist.

Implements Xapian::PostingIterator::Internal.

Definition at line 118 of file net_postlist.cc.

References description_append().

◆ get_docid()

Xapian::docid NetworkPostList::get_docid ( ) const
virtual

Get the current document ID.

Implements Xapian::PostingIterator::Internal.

Definition at line 39 of file net_postlist.cc.

◆ get_doclength()

Xapian::termcount NetworkPostList::get_doclength ( ) const
virtual

Get the length of the current document.

Implements Xapian::PostingIterator::Internal.

Definition at line 45 of file net_postlist.cc.

◆ get_termfreq()

Xapian::doccount NetworkPostList::get_termfreq ( ) const
virtual

Get number of documents indexed by this term.

Implements LeafPostList.

Definition at line 33 of file net_postlist.cc.

◆ get_unique_terms()

Xapian::termcount NetworkPostList::get_unique_terms ( ) const
virtual

Get the number of unique terms in the current document.

Implements Xapian::PostingIterator::Internal.

Definition at line 51 of file net_postlist.cc.

◆ get_wdf()

Xapian::termcount NetworkPostList::get_wdf ( ) const
virtual

Get the Within Document Frequency of the term in the current document.

Reimplemented from Xapian::PostingIterator::Internal.

Definition at line 57 of file net_postlist.cc.

◆ get_wdf_upper_bound()

Xapian::termcount NetworkPostList::get_wdf_upper_bound ( ) const
virtual

Implements LeafPostList.

Definition at line 108 of file net_postlist.cc.

References Assert.

◆ next()

PostList * NetworkPostList::next ( double  )
virtual

Move to the next document in the postlist (the weight parameter is ignored).

Implements Xapian::PostingIterator::Internal.

Definition at line 69 of file net_postlist.cc.

References decode_length().

◆ open_position_list()

PositionList * NetworkPostList::open_position_list ( ) const
virtual

Read the position list for the term in the current document and return a pointer to it (not owned by the PostList).

Reimplemented from Xapian::PostingIterator::Internal.

Definition at line 63 of file net_postlist.cc.

◆ skip_to()

PostList * NetworkPostList::skip_to ( Xapian::docid  did,
double  weight 
)
virtual

Skip forward to the next document with document ID >= the supplied document ID (the weight parameter is ignored).

Implements Xapian::PostingIterator::Internal.

Definition at line 92 of file net_postlist.cc.

Friends And Related Function Documentation

◆ RemoteDatabase

friend class RemoteDatabase
friend

Definition at line 37 of file net_postlist.h.

Member Data Documentation

◆ db

Xapian::Internal::intrusive_ptr<const RemoteDatabase> NetworkPostList::db
private

Definition at line 39 of file net_postlist.h.

◆ lastdocid

Xapian::docid NetworkPostList::lastdocid
private

Definition at line 46 of file net_postlist.h.

◆ lastwdf

Xapian::termcount NetworkPostList::lastwdf
private

Definition at line 47 of file net_postlist.h.

◆ pos

const char* NetworkPostList::pos
private

Definition at line 43 of file net_postlist.h.

◆ pos_end

const char* NetworkPostList::pos_end
private

Definition at line 44 of file net_postlist.h.

◆ postings

string NetworkPostList::postings
private

Definition at line 41 of file net_postlist.h.

◆ started

bool NetworkPostList::started
private

Definition at line 42 of file net_postlist.h.

◆ termfreq

Xapian::doccount NetworkPostList::termfreq
private

Definition at line 49 of file net_postlist.h.


The documentation for this class was generated from the following files: