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

#include <localsubmatch.h>

+ Collaboration diagram for LocalSubMatch:

Public Member Functions

 LocalSubMatch (const Xapian::Database::Internal *db_, const Xapian::Query &query_, Xapian::termcount qlen_, const Xapian::Weight &wt_factory_, Xapian::doccount shard_index_)
 Constructor. More...
 
Estimates resolve (EstimateOp *estimate_op)
 
void prepare_match (const Xapian::RSet &rset, Xapian::Weight::Internal &stats)
 Fetch and collate statistics. More...
 
void start_match (Xapian::Weight::Internal &total_stats_)
 Set the collated statistics. More...
 
PostListAndEstimate get_postlist (PostListTree *matcher, Xapian::termcount *total_subqs_ptr)
 Get PostList. More...
 
PostListAndEstimate make_synonym_postlist (PostListTree *pltree, PostListAndEstimate or_pl, double factor, const TermFreqs &termfreqs)
 Convert a postlist into a synonym postlist. More...
 
PostListAndEstimate open_post_list (const std::string &term, Xapian::termcount wqf, double factor, bool need_positions, bool compound_weight, Xapian::Internal::QueryOptimiser *qopt, bool lazy_weight, TermFreqs *termfreqs)
 
void register_lazy_postlist_for_stats (LeafPostList *pl, TermFreqs *termfreqs)
 
bool weight_needs_wdf () const
 
const Xapian::Weight::Internalget_stats () const
 

Private Member Functions

LocalSubMatchoperator= (const LocalSubMatch &)=delete
 Don't allow assignment. More...
 
 LocalSubMatch (const LocalSubMatch &)=delete
 Don't allow copying. More...
 

Private Attributes

Xapian::Weight::Internaltotal_stats = nullptr
 The statistics for the collection. More...
 
Xapian::Query query
 The query. More...
 
Xapian::termcount qlen
 The query length (used by some weighting schemes). More...
 
const Xapian::Database::Internaldb
 The (sub-)Database we're searching. More...
 
const Xapian::Weightwt_factory
 Weight object (used as a factory by calling create on it). More...
 
Xapian::doccount shard_index
 0-based index for the subdatabase. More...
 

Detailed Description

Definition at line 43 of file localsubmatch.h.

Constructor & Destructor Documentation

◆ LocalSubMatch() [1/2]

LocalSubMatch::LocalSubMatch ( const LocalSubMatch )
privatedelete

Don't allow copying.

◆ LocalSubMatch() [2/2]

LocalSubMatch::LocalSubMatch ( const Xapian::Database::Internal db_,
const Xapian::Query query_,
Xapian::termcount  qlen_,
const Xapian::Weight wt_factory_,
Xapian::doccount  shard_index_ 
)
inline

Constructor.

Definition at line 70 of file localsubmatch.h.

Member Function Documentation

◆ get_postlist()

PostListAndEstimate LocalSubMatch::get_postlist ( PostListTree matcher,
Xapian::termcount total_subqs_ptr 
)

◆ get_stats()

const Xapian::Weight::Internal* LocalSubMatch::get_stats ( ) const
inline

Definition at line 159 of file localsubmatch.h.

References total_stats.

Referenced by Xapian::Internal::QueryOptimiser::get_stats().

◆ make_synonym_postlist()

PostListAndEstimate LocalSubMatch::make_synonym_postlist ( PostListTree pltree,
PostListAndEstimate  or_pl,
double  factor,
const TermFreqs termfreqs 
)

◆ open_post_list()

PostListAndEstimate LocalSubMatch::open_post_list ( const std::string &  term,
Xapian::termcount  wqf,
double  factor,
bool  need_positions,
bool  compound_weight,
Xapian::Internal::QueryOptimiser qopt,
bool  lazy_weight,
TermFreqs termfreqs 
)

◆ operator=()

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

Don't allow assignment.

◆ prepare_match()

void LocalSubMatch::prepare_match ( const Xapian::RSet rset,
Xapian::Weight::Internal 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
rsetThe RSet for this shard.
statsWeight::Internal object to add the statistics to.

Definition at line 99 of file localsubmatch.h.

References Xapian::Weight::Internal::accumulate_stats(), and db.

◆ register_lazy_postlist_for_stats()

void LocalSubMatch::register_lazy_postlist_for_stats ( LeafPostList pl,
TermFreqs termfreqs 
)
inline

◆ resolve()

Estimates LocalSubMatch::resolve ( EstimateOp estimate_op)
inline

◆ start_match()

void LocalSubMatch::start_match ( Xapian::Weight::Internal total_stats_)
inline

Set the collated statistics.

These will be used when generating the PostList tree.

Definition at line 109 of file localsubmatch.h.

References total_stats.

◆ weight_needs_wdf()

bool LocalSubMatch::weight_needs_wdf ( ) const
inline

Member Data Documentation

◆ db

const Xapian::Database::Internal* LocalSubMatch::db
private

The (sub-)Database we're searching.

Definition at line 60 of file localsubmatch.h.

Referenced by prepare_match(), register_lazy_postlist_for_stats(), and resolve().

◆ qlen

Xapian::termcount LocalSubMatch::qlen
private

The query length (used by some weighting schemes).

Definition at line 57 of file localsubmatch.h.

◆ query

Xapian::Query LocalSubMatch::query
private

The query.

Definition at line 54 of file localsubmatch.h.

◆ shard_index

Xapian::doccount LocalSubMatch::shard_index
private

0-based index for the subdatabase.

Definition at line 66 of file localsubmatch.h.

◆ total_stats

Xapian::Weight::Internal* LocalSubMatch::total_stats = nullptr
private

The statistics for the collection.

Definition at line 51 of file localsubmatch.h.

Referenced by get_stats(), register_lazy_postlist_for_stats(), and start_match().

◆ wt_factory

const Xapian::Weight& LocalSubMatch::wt_factory
private

Weight object (used as a factory by calling create on it).

Definition at line 63 of file localsubmatch.h.

Referenced by weight_needs_wdf().


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