xapian-core  2.0.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ContiguousAllDocsPostList Class Reference

A PostList iterating all docids when they form a contiguous range. More...

#include <contiguousalldocspostlist.h>

+ Inheritance diagram for ContiguousAllDocsPostList:
+ Collaboration diagram for ContiguousAllDocsPostList:

Public Member Functions

 ContiguousAllDocsPostList (Xapian::doccount doccount)
 Constructor. More...
 
Xapian::docid get_docid () const
 Return the current docid. More...
 
Xapian::termcount get_wdf () const
 Always return 1 (wdf isn't totally meaningful for us). More...
 
PositionListread_position_list ()
 Throws InvalidOperationError. More...
 
PositionListopen_position_list () const
 Throws InvalidOperationError. More...
 
PostListnext (double w_min)
 Advance to the next document. More...
 
PostListskip_to (Xapian::docid target, double w_min)
 Skip ahead to next document with docid >= target. More...
 
bool at_end () const
 Return true if and only if we're off the end of the list. More...
 
Xapian::termcount get_wdf_upper_bound () const
 Always return 1 (wdf isn't totally meaningful for us). More...
 
std::string get_description () const
 Return a string description of this object. 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 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 Member Functions

void operator= (const ContiguousAllDocsPostList &)
 Don't allow assignment. More...
 
 ContiguousAllDocsPostList (const ContiguousAllDocsPostList &)
 Don't allow copying. More...
 

Private Attributes

Xapian::docid did = 0
 The current document id. More...
 

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 iterating all docids when they form a contiguous range.

Definition at line 30 of file contiguousalldocspostlist.h.

Constructor & Destructor Documentation

◆ ContiguousAllDocsPostList() [1/2]

ContiguousAllDocsPostList::ContiguousAllDocsPostList ( const ContiguousAllDocsPostList )
private

Don't allow copying.

◆ ContiguousAllDocsPostList() [2/2]

ContiguousAllDocsPostList::ContiguousAllDocsPostList ( Xapian::doccount  doccount)
inlineexplicit

Constructor.

Definition at line 46 of file contiguousalldocspostlist.h.

Member Function Documentation

◆ at_end()

bool ContiguousAllDocsPostList::at_end ( ) const
virtual

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

Implements Xapian::Internal::PostList.

Definition at line 86 of file contiguousalldocspostlist.cc.

◆ get_description()

string ContiguousAllDocsPostList::get_description ( ) const
virtual

Return a string description of this object.

Implements Xapian::Internal::PostList.

Definition at line 98 of file contiguousalldocspostlist.cc.

References Xapian::Internal::str().

◆ get_docid()

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

Return the current docid.

Implements Xapian::Internal::PostList.

Definition at line 33 of file contiguousalldocspostlist.cc.

References Assert.

◆ get_wdf()

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

Always return 1 (wdf isn't totally meaningful for us).

Reimplemented from Xapian::Internal::PostList.

Definition at line 40 of file contiguousalldocspostlist.cc.

References Assert.

◆ get_wdf_upper_bound()

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

Always return 1 (wdf isn't totally meaningful for us).

Implements LeafPostList.

Definition at line 92 of file contiguousalldocspostlist.cc.

◆ next()

PostList * ContiguousAllDocsPostList::next ( double  w_min)
virtual

Advance to the next document.

Implements Xapian::Internal::PostList.

Definition at line 60 of file contiguousalldocspostlist.cc.

◆ open_position_list()

PositionList * ContiguousAllDocsPostList::open_position_list ( ) const
virtual

Throws InvalidOperationError.

Reimplemented from Xapian::Internal::PostList.

Definition at line 54 of file contiguousalldocspostlist.cc.

Referenced by read_position_list().

◆ operator=()

void ContiguousAllDocsPostList::operator= ( const ContiguousAllDocsPostList )
private

Don't allow assignment.

◆ read_position_list()

PositionList * ContiguousAllDocsPostList::read_position_list ( )
virtual

Throws InvalidOperationError.

Reimplemented from Xapian::Internal::PostList.

Definition at line 47 of file contiguousalldocspostlist.cc.

References open_position_list().

◆ skip_to()

PostList * ContiguousAllDocsPostList::skip_to ( Xapian::docid  target,
double  w_min 
)
virtual

Skip ahead to next document with docid >= target.

Implements Xapian::Internal::PostList.

Definition at line 72 of file contiguousalldocspostlist.cc.

Member Data Documentation

◆ did

Xapian::docid ContiguousAllDocsPostList::did = 0
private

The current document id.

This will be 0 before we start and once we reach the end.

Definition at line 41 of file contiguousalldocspostlist.h.


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