xapian-core  1.4.19
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
QueryOptimiser Class Reference

#include <queryoptimiser.h>

+ Collaboration diagram for QueryOptimiser:

Public Member Functions

 QueryOptimiser (const Xapian::Database::Internal &db_, LocalSubMatch &localsubmatch_, MultiMatch *matcher_, Xapian::doccount shard_index_)
 
 ~QueryOptimiser ()
 
bool full_db_has_positions () const
 
void inc_total_subqs ()
 
Xapian::termcount get_total_subqs () const
 
void set_total_subqs (Xapian::termcount n)
 
LeafPostListopen_post_list (const std::string &term, Xapian::termcount wqf, double factor)
 
LeafPostListopen_lazy_post_list (const std::string &term, Xapian::termcount wqf, double factor)
 
PostListmake_synonym_postlist (PostList *pl, double factor, bool wdf_disjoint)
 
const LeafPostListget_hint_postlist () const
 
void set_hint_postlist (LeafPostList *new_hint)
 
void destroy_postlist (PostList *pl)
 

Public Attributes

bool need_positions
 
bool in_synonym
 
Xapian::doccount shard_index
 
const Xapian::Database::Internaldb
 
Xapian::doccount db_size
 
MultiMatchmatcher
 

Private Member Functions

void operator= (const QueryOptimiser &)
 Prevent assignment. More...
 
 QueryOptimiser (const QueryOptimiser &)
 Prevent copying. More...
 

Private Attributes

LocalSubMatchlocalsubmatch
 
Xapian::termcount total_subqs
 How many weighted leaf subqueries there are. More...
 
LeafPostListhint
 
bool hint_owned
 

Detailed Description

Definition at line 32 of file queryoptimiser.h.

Constructor & Destructor Documentation

◆ QueryOptimiser() [1/2]

QueryOptimiser::QueryOptimiser ( const QueryOptimiser )
private

Prevent copying.

◆ QueryOptimiser() [2/2]

QueryOptimiser::QueryOptimiser ( const Xapian::Database::Internal db_,
LocalSubMatch localsubmatch_,
MultiMatch matcher_,
Xapian::doccount  shard_index_ 
)
inline

Definition at line 65 of file queryoptimiser.h.

◆ ~QueryOptimiser()

QueryOptimiser::~QueryOptimiser ( )
inline

Definition at line 76 of file queryoptimiser.h.

References hint.

Member Function Documentation

◆ destroy_postlist()

void QueryOptimiser::destroy_postlist ( PostList pl)
inline

Definition at line 121 of file queryoptimiser.h.

Referenced by Xapian::Internal::Context::shrink().

◆ full_db_has_positions()

bool QueryOptimiser::full_db_has_positions ( ) const
inline

◆ get_hint_postlist()

const LeafPostList* QueryOptimiser::get_hint_postlist ( ) const
inline

Definition at line 111 of file queryoptimiser.h.

References hint.

Referenced by LocalSubMatch::open_post_list().

◆ get_total_subqs()

Xapian::termcount QueryOptimiser::get_total_subqs ( ) const
inline

◆ inc_total_subqs()

void QueryOptimiser::inc_total_subqs ( )
inline

◆ make_synonym_postlist()

PostList* QueryOptimiser::make_synonym_postlist ( PostList pl,
double  factor,
bool  wdf_disjoint 
)
inline

◆ open_lazy_post_list()

LeafPostList* QueryOptimiser::open_lazy_post_list ( const std::string &  term,
Xapian::termcount  wqf,
double  factor 
)
inline

◆ open_post_list()

LeafPostList* QueryOptimiser::open_post_list ( const std::string &  term,
Xapian::termcount  wqf,
double  factor 
)
inline

Definition at line 90 of file queryoptimiser.h.

References LocalSubMatch::open_post_list().

Referenced by Xapian::Internal::QueryTerm::postlist().

◆ operator=()

void QueryOptimiser::operator= ( const QueryOptimiser )
private

Prevent assignment.

◆ set_hint_postlist()

void QueryOptimiser::set_hint_postlist ( LeafPostList new_hint)
inline

Definition at line 113 of file queryoptimiser.h.

References hint.

Referenced by LocalSubMatch::open_post_list().

◆ set_total_subqs()

void QueryOptimiser::set_total_subqs ( Xapian::termcount  n)
inline

Member Data Documentation

◆ db

const Xapian::Database::Internal& QueryOptimiser::db

◆ db_size

Xapian::doccount QueryOptimiser::db_size

◆ hint

LeafPostList* QueryOptimiser::hint
private

Definition at line 48 of file queryoptimiser.h.

Referenced by get_hint_postlist(), set_hint_postlist(), and ~QueryOptimiser().

◆ hint_owned

bool QueryOptimiser::hint_owned
private

Definition at line 50 of file queryoptimiser.h.

◆ in_synonym

bool QueryOptimiser::in_synonym

◆ localsubmatch

LocalSubMatch& QueryOptimiser::localsubmatch
private

Definition at line 39 of file queryoptimiser.h.

◆ matcher

MultiMatch* QueryOptimiser::matcher

◆ need_positions

bool QueryOptimiser::need_positions

Definition at line 53 of file queryoptimiser.h.

Referenced by Xapian::Internal::QueryWindowed::postlist_windowed().

◆ shard_index

Xapian::doccount QueryOptimiser::shard_index

Definition at line 57 of file queryoptimiser.h.

Referenced by Xapian::Internal::QueryPostingSource::postlist().

◆ total_subqs

Xapian::termcount QueryOptimiser::total_subqs
private

How many weighted leaf subqueries there are.

Used for scaling percentages when the highest weighted document doesn't "match all terms".

Definition at line 46 of file queryoptimiser.h.

Referenced by get_total_subqs(), and inc_total_subqs().


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