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

Class for performing matching on a remote database. More...

#include <remotesubmatch.h>

+ Collaboration diagram for RemoteSubMatch:

Public Types

typedef Xapian::Internal::opt_intrusive_ptr< Xapian::MatchSpyopt_ptr_spy
 

Public Member Functions

 RemoteSubMatch (const RemoteDatabase *db_, Xapian::doccount shard_)
 Constructor. More...
 
int get_read_fd () const
 
void prepare_match (Xapian::Weight::Internal &total_stats)
 Fetch and collate statistics. More...
 
void start_match (Xapian::doccount first, Xapian::doccount maxitems, Xapian::doccount check_at_least, const Xapian::KeyMaker *sorter, const Xapian::Weight::Internal &total_stats)
 Start the match. More...
 
Xapian::MSet get_mset (const std::vector< opt_ptr_spy > &matchspies)
 Get MSet. More...
 
Xapian::doccount get_shard () const
 Return the index of the corresponding Database shard. More...
 

Private Member Functions

RemoteSubMatchoperator= (const RemoteSubMatch &)=delete
 Don't allow assignment. More...
 
 RemoteSubMatch (const RemoteSubMatch &)=delete
 Don't allow copying. More...
 

Private Attributes

const RemoteDatabasedb
 The remote database. More...
 
Xapian::doccount shard
 Index of this subdatabase. More...
 

Detailed Description

Class for performing matching on a remote database.

Definition at line 33 of file remotesubmatch.h.

Member Typedef Documentation

◆ opt_ptr_spy

Definition at line 84 of file remotesubmatch.h.

Constructor & Destructor Documentation

◆ RemoteSubMatch() [1/2]

RemoteSubMatch::RemoteSubMatch ( const RemoteSubMatch )
privatedelete

Don't allow copying.

◆ RemoteSubMatch() [2/2]

RemoteSubMatch::RemoteSubMatch ( const RemoteDatabase db_,
Xapian::doccount  shard_ 
)
inline

Constructor.

Definition at line 48 of file remotesubmatch.h.

Member Function Documentation

◆ get_mset()

Xapian::MSet RemoteSubMatch::get_mset ( const std::vector< opt_ptr_spy > &  matchspies)
inline

Get MSet.

Parameters
matchspiesThe matchspies to use.

Definition at line 90 of file remotesubmatch.h.

References db, and RemoteDatabase::get_mset().

Referenced by Matcher::get_mset().

◆ get_read_fd()

int RemoteSubMatch::get_read_fd ( ) const
inline

Definition at line 51 of file remotesubmatch.h.

References db, and RemoteDatabase::get_read_fd().

◆ get_shard()

Xapian::doccount RemoteSubMatch::get_shard ( ) const
inline

Return the index of the corresponding Database shard.

Definition at line 95 of file remotesubmatch.h.

References shard.

Referenced by Matcher::get_mset().

◆ operator=()

RemoteSubMatch& RemoteSubMatch::operator= ( const RemoteSubMatch )
privatedelete

Don't allow assignment.

◆ prepare_match()

void RemoteSubMatch::prepare_match ( Xapian::Weight::Internal total_stats)
inline

Fetch and collate statistics.

Before we can calculate term weights we need to fetch statistics from each database involved and collate them.

Parameters
total_statsA stats object to which the statistics should be added.

Definition at line 63 of file remotesubmatch.h.

References RemoteDatabase::accumulate_remote_stats(), and db.

◆ start_match()

void RemoteSubMatch::start_match ( Xapian::doccount  first,
Xapian::doccount  maxitems,
Xapian::doccount  check_at_least,
const Xapian::KeyMaker sorter,
const Xapian::Weight::Internal total_stats 
)
inline

Start the match.

Parameters
firstThe first item in the result set to return.
maxitemsThe maximum number of items to return.
check_at_leastThe minimum number of items to check.
sorterKeyMaker for sort keys (NULL for none).
total_statsThe total statistics for the collection.

Definition at line 75 of file remotesubmatch.h.

References db, and RemoteDatabase::send_global_stats().

Referenced by Matcher::get_mset().

Member Data Documentation

◆ db

const RemoteDatabase* RemoteSubMatch::db
private

The remote database.

Definition at line 41 of file remotesubmatch.h.

Referenced by get_mset(), get_read_fd(), prepare_match(), and start_match().

◆ shard

Xapian::doccount RemoteSubMatch::shard
private

Index of this subdatabase.

Definition at line 44 of file remotesubmatch.h.

Referenced by get_shard().


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