xapian-core  1.4.25
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::Internal::intrusive_ptr< const Xapian::Database::Internal > db_, Xapian::doccount doccount_)
 Constructor. More...
 
Xapian::doccount get_termfreq () const
 Return the term frequency. More...
 
Xapian::docid get_docid () const
 Return the current docid. More...
 
Xapian::termcount get_doclength () const
 Return the length of current document. More...
 
Xapian::termcount get_unique_terms () const
 Return the number of unique terms. 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 ()
 
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 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 operator= (const ContiguousAllDocsPostList &)
 Don't allow assignment. More...
 
 ContiguousAllDocsPostList (const ContiguousAllDocsPostList &)
 Don't allow copying. More...
 

Private Attributes

Xapian::Internal::intrusive_ptr< const Xapian::Database::Internaldb
 The database we're iterating over. More...
 
Xapian::docid did
 The current document id. More...
 
Xapian::doccount doccount
 The number of documents in the database. More...
 

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

Definition at line 31 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::Internal::intrusive_ptr< const Xapian::Database::Internal db_,
Xapian::doccount  doccount_ 
)
inline

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::PostingIterator::Internal.

Definition at line 112 of file contiguousalldocspostlist.cc.

Referenced by ContiguousAllDocsPostList().

◆ get_description()

string ContiguousAllDocsPostList::get_description ( ) const
virtual

Return a string description of this object.

Implements Xapian::PostingIterator::Internal.

Definition at line 124 of file contiguousalldocspostlist.cc.

References Xapian::Internal::str().

Referenced by ContiguousAllDocsPostList().

◆ get_docid()

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

Return the current docid.

Implements Xapian::PostingIterator::Internal.

Definition at line 41 of file contiguousalldocspostlist.cc.

References Assert.

Referenced by ContiguousAllDocsPostList().

◆ get_doclength()

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

Return the length of current document.

Implements Xapian::PostingIterator::Internal.

Definition at line 49 of file contiguousalldocspostlist.cc.

References Assert.

Referenced by ContiguousAllDocsPostList().

◆ get_termfreq()

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

Return the term frequency.

For an all documents postlist, this is the number of documents in the database.

Implements LeafPostList.

Definition at line 35 of file contiguousalldocspostlist.cc.

Referenced by ContiguousAllDocsPostList().

◆ get_unique_terms()

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

Return the number of unique terms.

Implements Xapian::PostingIterator::Internal.

Definition at line 57 of file contiguousalldocspostlist.cc.

References Assert.

Referenced by ContiguousAllDocsPostList().

◆ get_wdf()

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

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

Reimplemented from Xapian::PostingIterator::Internal.

Definition at line 65 of file contiguousalldocspostlist.cc.

References Assert.

Referenced by ContiguousAllDocsPostList().

◆ 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 118 of file contiguousalldocspostlist.cc.

Referenced by ContiguousAllDocsPostList().

◆ next()

PostList * ContiguousAllDocsPostList::next ( double  w_min)
virtual

Advance to the next document.

Implements Xapian::PostingIterator::Internal.

Definition at line 86 of file contiguousalldocspostlist.cc.

References Assert.

◆ open_position_list()

PositionList * ContiguousAllDocsPostList::open_position_list ( ) const
virtual

Throws InvalidOperationError.

Reimplemented from Xapian::PostingIterator::Internal.

Definition at line 80 of file contiguousalldocspostlist.cc.

Referenced by ContiguousAllDocsPostList(), and 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::PostingIterator::Internal.

Definition at line 73 of file contiguousalldocspostlist.cc.

References open_position_list().

Referenced by ContiguousAllDocsPostList().

◆ skip_to()

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

Skip ahead to next document with docid >= target.

Implements Xapian::PostingIterator::Internal.

Definition at line 98 of file contiguousalldocspostlist.cc.

References Assert.

Referenced by ContiguousAllDocsPostList().

Member Data Documentation

◆ db

Xapian::Internal::intrusive_ptr<const Xapian::Database::Internal> ContiguousAllDocsPostList::db
private

The database we're iterating over.

Definition at line 39 of file contiguousalldocspostlist.h.

◆ did

Xapian::docid ContiguousAllDocsPostList::did
private

The current document id.

Definition at line 42 of file contiguousalldocspostlist.h.

◆ doccount

Xapian::doccount ContiguousAllDocsPostList::doccount
private

The number of documents in the database.

Definition at line 45 of file contiguousalldocspostlist.h.


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