xapian-core  1.4.25
Classes | Public Member Functions | Private Attributes | List of all members
Xapian::RSet Class Reference

A relevance set (R-Set). More...

#include <enquire.h>

+ Collaboration diagram for Xapian::RSet:

Classes

class  Internal
 

Public Member Functions

 RSet (const RSet &rset)
 Copy constructor. More...
 
void operator= (const RSet &rset)
 Assignment operator. More...
 
 RSet ()
 Default constructor. More...
 
 ~RSet ()
 Destructor. More...
 
Xapian::doccount size () const
 The number of documents in this R-Set. More...
 
bool empty () const
 Test if this R-Set is empty. More...
 
void add_document (Xapian::docid did)
 Add a document to the relevance set. More...
 
void add_document (const Xapian::MSetIterator &i)
 Add a document to the relevance set. More...
 
void remove_document (Xapian::docid did)
 Remove a document from the relevance set. More...
 
void remove_document (const Xapian::MSetIterator &i)
 Remove a document from the relevance set. More...
 
bool contains (Xapian::docid did) const
 Test if a given document in the relevance set. More...
 
bool contains (const Xapian::MSetIterator &i) const
 Test if a given document in the relevance set. More...
 
std::string get_description () const
 Return a string describing this object. More...
 

Private Attributes

Xapian::Internal::intrusive_ptr< Internalinternal
 

Detailed Description

A relevance set (R-Set).

This is the set of documents which are marked as relevant, for use in modifying the term weights, and in performing query expansion.

Definition at line 60 of file enquire.h.

Constructor & Destructor Documentation

◆ RSet() [1/2]

Xapian::RSet::RSet ( const RSet rset)

Copy constructor.

Definition at line 72 of file omenquire.cc.

◆ RSet() [2/2]

Xapian::RSet::RSet ( )

Default constructor.

Definition at line 68 of file omenquire.cc.

Referenced by operator=().

◆ ~RSet()

Xapian::RSet::~RSet ( )

Destructor.

Definition at line 87 of file omenquire.cc.

Member Function Documentation

◆ add_document() [1/2]

void Xapian::RSet::add_document ( Xapian::docid  did)

Add a document to the relevance set.

Definition at line 104 of file omenquire.cc.

Referenced by DEFINE_TESTCASE(), main(), and unserialise_rset().

◆ add_document() [2/2]

void Xapian::RSet::add_document ( const Xapian::MSetIterator i)
inline

Add a document to the relevance set.

Definition at line 98 of file enquire.h.

References add_document().

Referenced by add_document().

◆ contains() [1/2]

bool Xapian::RSet::contains ( Xapian::docid  did) const

Test if a given document in the relevance set.

Definition at line 117 of file omenquire.cc.

◆ contains() [2/2]

bool Xapian::RSet::contains ( const Xapian::MSetIterator i) const
inline

Test if a given document in the relevance set.

Definition at line 110 of file enquire.h.

References contains().

Referenced by contains().

◆ empty()

bool Xapian::RSet::empty ( ) const

◆ get_description()

string Xapian::RSet::get_description ( ) const

Return a string describing this object.

Definition at line 123 of file omenquire.cc.

Referenced by DEFINE_TESTCASE().

◆ operator=()

RSet & Xapian::RSet::operator= ( const RSet rset)
default

Assignment operator.

Definition at line 77 of file omenquire.cc.

References internal, and RSet().

◆ remove_document() [1/2]

void Xapian::RSet::remove_document ( Xapian::docid  did)

Remove a document from the relevance set.

Definition at line 111 of file omenquire.cc.

◆ remove_document() [2/2]

void Xapian::RSet::remove_document ( const Xapian::MSetIterator i)
inline

Remove a document from the relevance set.

Definition at line 104 of file enquire.h.

References contains(), and remove_document().

Referenced by remove_document().

◆ size()

Xapian::doccount Xapian::RSet::size ( ) const

The number of documents in this R-Set.

Definition at line 92 of file omenquire.cc.

Referenced by Xapian::Weight::Internal::accumulate_stats(), DEFINE_TESTCASE(), Xapian::Enquire::Internal::get_eset(), and unserialise_rset().

Member Data Documentation

◆ internal

Xapian::Internal::intrusive_ptr<Internal> Xapian::RSet::internal
private

Reference counted internals.

Definition at line 63 of file enquire.h.

Referenced by Xapian::Weight::Internal::accumulate_stats(), Xapian::build_termlist_tree(), operator=(), serialise_rset(), and split_rset_by_db().


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