xapian-core  2.0.0
Public 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_, std::string_view term_, Xapian::doccount termfreq_, std::string &&postings_)
 Constructor. More...
 
Xapian::docid get_docid () const
 Get the current document ID. 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
 
std::string get_description () const
 Get a description of the postlist. More...
 
- Public Member Functions inherited from LeafPostList
 ~LeafPostList ()
 
Xapian::termcount get_collfreq () const
 Get the collection frequency of the term. More...
 
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, const Xapian::Database::Internal *shard)
 
double get_weight (Xapian::termcount doclen, Xapian::termcount unique_terms, Xapian::termcount wdfdocmax) const
 Return the weight contribution for the current position. More...
 
double recalc_maxweight ()
 Recalculate the upper bound on what get_weight() can return. 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 bool open_nearby_postlist (std::string_view term_, bool need_read_pos, LeafPostList *&pl) const
 Open another postlist from the same database. More...
 
const std::string & get_term () const
 Get the term name. More...
 
void set_term (std::string_view term_)
 Set the term name. More...
 
- Public Member Functions inherited from Xapian::Internal::PostList
virtual ~PostList ()
 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...
 
Xapian::doccount get_termfreq () const
 Get an estimate of the number of documents this PostList will return. 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 PostListcheck (Xapian::docid did, double w_min, bool &valid)
 Check if the specified docid occurs in this postlist. More...
 
PostListnext ()
 Advance the current position to the next document in the postlist. More...
 
PostListskip_to (Xapian::docid did)
 Skip forward to the specified docid. More...
 
virtual void get_docid_range (docid &first, docid &last) const
 Get the bounds on the range of docids this PostList can return. More...
 

Private Attributes

Xapian::Internal::intrusive_ptr< const RemoteDatabasedb
 
std::string postings
 
bool started = false
 
const char * pos = NULL
 
const char * pos_end = NULL
 
Xapian::docid lastdocid = 0
 
Xapian::termcount lastwdf = 0
 

Friends

class RemoteDatabase
 

Additional Inherited Members

- Protected Member Functions inherited from LeafPostList
 LeafPostList (std::string_view term_)
 Only constructable as a base class for derived classes. More...
 
- Protected Member Functions inherited from Xapian::Internal::PostList
 PostList ()
 Only constructable as a base class for derived classes. More...
 
- Protected Attributes inherited from LeafPostList
const Xapian::Weightweight = nullptr
 
std::string term
 The term name for this postlist (empty for an alldocs postlist). More...
 
Xapian::termcount collfreq
 The collection frequency of the term. More...
 
- Protected Attributes inherited from Xapian::Internal::PostList
Xapian::doccount termfreq
 Estimate of the number of documents this PostList will return. More...
 

Detailed Description

A postlist in a remote database.

Definition at line 35 of file net_postlist.h.

Constructor & Destructor Documentation

◆ NetworkPostList()

NetworkPostList::NetworkPostList ( Xapian::Internal::intrusive_ptr< const RemoteDatabase db_,
std::string_view  term_,
Xapian::doccount  termfreq_,
std::string &&  postings_ 
)
inline

Constructor.

Definition at line 50 of file net_postlist.h.

References Xapian::Internal::PostList::termfreq.

Member Function Documentation

◆ 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::Internal::PostList.

Definition at line 85 of file net_postlist.cc.

References pos.

◆ get_description()

string NetworkPostList::get_description ( ) const
virtual

Get a description of the postlist.

Implements Xapian::Internal::PostList.

Definition at line 101 of file net_postlist.cc.

References description_append(), and term.

◆ get_docid()

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

Get the current document ID.

Implements Xapian::Internal::PostList.

Definition at line 33 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::Internal::PostList.

Definition at line 39 of file net_postlist.cc.

◆ get_wdf_upper_bound()

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

Implements LeafPostList.

Definition at line 91 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::Internal::PostList.

Definition at line 51 of file net_postlist.cc.

References pos, unpack_throw_serialisation_error(), and unpack_uint().

◆ 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::Internal::PostList.

Definition at line 45 of file net_postlist.cc.

References term.

◆ 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::Internal::PostList.

Definition at line 75 of file net_postlist.cc.

References pos.

Friends And Related Function Documentation

◆ RemoteDatabase

friend class RemoteDatabase
friend

Definition at line 36 of file net_postlist.h.

Member Data Documentation

◆ db

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

Definition at line 38 of file net_postlist.h.

◆ lastdocid

Xapian::docid NetworkPostList::lastdocid = 0
private

Definition at line 45 of file net_postlist.h.

◆ lastwdf

Xapian::termcount NetworkPostList::lastwdf = 0
private

Definition at line 46 of file net_postlist.h.

◆ pos

const char* NetworkPostList::pos = NULL
private

Definition at line 42 of file net_postlist.h.

◆ pos_end

const char* NetworkPostList::pos_end = NULL
private

Definition at line 43 of file net_postlist.h.

◆ postings

std::string NetworkPostList::postings
private

Definition at line 40 of file net_postlist.h.

◆ started

bool NetworkPostList::started = false
private

Definition at line 41 of file net_postlist.h.


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