xapian-core  2.0.0
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
Xapian::MSet::Internal Class Reference

Xapian::MSet internals. More...

#include <msetinternal.h>

+ Inheritance diagram for Xapian::MSet::Internal:
+ Collaboration diagram for Xapian::MSet::Internal:

Public Member Functions

 Internal ()
 
 Internal (Xapian::doccount first_, Xapian::doccount matches_upper_bound_, Xapian::doccount matches_lower_bound_, Xapian::doccount matches_estimated_, Xapian::doccount uncollapsed_upper_bound_, Xapian::doccount uncollapsed_lower_bound_, Xapian::doccount uncollapsed_estimated_, double max_possible_, double max_attained_, std::vector< Result > &&items_, double percent_scale_factor_)
 
void set_first (Xapian::doccount first_)
 
void set_enquire (const Xapian::Enquire::Internal *enquire_)
 
Xapian::Weight::Internalget_stats () const
 
void set_stats (Xapian::Weight::Internal *stats_)
 
double get_percent_scale_factor () const
 
Xapian::Document get_document (Xapian::doccount index) const
 
void fetch (Xapian::doccount first, Xapian::doccount last) const
 
void set_item_weight (Xapian::doccount i, double weight)
 
int convert_to_percent (double weight) const
 
void unshard_docids (Xapian::doccount shard, Xapian::doccount n_shards)
 
void merge_stats (const Internal *o, bool collapsing)
 
std::string snippet (std::string_view text, size_t length, const Xapian::Stem &stemmer, unsigned flags, std::string_view hi_start, std::string_view hi_end, std::string_view omit) const
 
std::string serialise () const
 Serialise this object. More...
 
void unserialise (const char *p, const char *p_end)
 Unserialise a serialised Xapian::MSet::Internal object. More...
 
std::string get_description () const
 Return a string describing this object. More...
 
- Public Member Functions inherited from Xapian::Internal::intrusive_base
 intrusive_base ()
 Construct with no references. More...
 

Private Member Functions

void operator= (const Internal &)=delete
 Don't allow assignment. More...
 
 Internal (const Internal &)=delete
 Don't allow copying. More...
 

Private Attributes

std::unordered_map< std::string, double > snippet_bg_relevance
 Relevance weights for non-query terms for generating snippets. More...
 
std::vector< Resultitems
 The items in the MSet. More...
 
std::unique_ptr< Xapian::Weight::Internalstats
 For looking up query term frequencies and weights. More...
 
Xapian::Internal::intrusive_ptr< const Enquire::Internalenquire
 
Xapian::doccount matches_lower_bound = 0
 
Xapian::doccount matches_estimated = 0
 
Xapian::doccount matches_upper_bound = 0
 
Xapian::doccount uncollapsed_lower_bound = 0
 
Xapian::doccount uncollapsed_estimated = 0
 
Xapian::doccount uncollapsed_upper_bound = 0
 
Xapian::doccount first = 0
 
double max_possible = 0
 
double max_attained = 0
 
double percent_scale_factor = 0
 Scale factor to convert weights to percentages. More...
 

Friends

class MSet
 
class MSetIterator
 
class ::Matcher
 

Additional Inherited Members

- Public Attributes inherited from Xapian::Internal::intrusive_base
unsigned _refs
 Reference count. More...
 

Detailed Description

Xapian::MSet internals.

Definition at line 44 of file msetinternal.h.

Constructor & Destructor Documentation

◆ Internal() [1/3]

Xapian::MSet::Internal::Internal ( const Internal )
privatedelete

Don't allow copying.

◆ Internal() [2/3]

Xapian::MSet::Internal::Internal ( )
inline

Definition at line 88 of file msetinternal.h.

◆ Internal() [3/3]

Xapian::MSet::Internal::Internal ( Xapian::doccount  first_,
Xapian::doccount  matches_upper_bound_,
Xapian::doccount  matches_lower_bound_,
Xapian::doccount  matches_estimated_,
Xapian::doccount  uncollapsed_upper_bound_,
Xapian::doccount  uncollapsed_lower_bound_,
Xapian::doccount  uncollapsed_estimated_,
double  max_possible_,
double  max_attained_,
std::vector< Result > &&  items_,
double  percent_scale_factor_ 
)
inline

Definition at line 90 of file msetinternal.h.

Member Function Documentation

◆ convert_to_percent()

int Xapian::MSet::Internal::convert_to_percent ( double  weight) const

Definition at line 449 of file mset.cc.

◆ fetch()

void Xapian::MSet::Internal::fetch ( Xapian::doccount  first,
Xapian::doccount  last 
) const

Definition at line 414 of file mset.cc.

◆ get_description()

string Xapian::MSet::Internal::get_description ( ) const

Return a string describing this object.

Definition at line 598 of file mset.cc.

References Xapian::Internal::str().

◆ get_document()

Document Xapian::MSet::Internal::get_document ( Xapian::doccount  index) const

Definition at line 400 of file mset.cc.

References Assert, enquire, items, and Xapian::Internal::str().

◆ get_percent_scale_factor()

double Xapian::MSet::Internal::get_percent_scale_factor ( ) const
inline

Definition at line 123 of file msetinternal.h.

References percent_scale_factor.

◆ get_stats()

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

Definition at line 119 of file msetinternal.h.

References stats.

◆ merge_stats()

void Xapian::MSet::Internal::merge_stats ( const Internal o,
bool  collapsing 
)

◆ operator=()

void Xapian::MSet::Internal::operator= ( const Internal )
privatedelete

Don't allow assignment.

◆ serialise()

string Xapian::MSet::Internal::serialise ( ) const

Serialise this object.

Returns
The serialisation of this object.

Definition at line 517 of file mset.cc.

References pack_string(), pack_uint(), serialise_double(), and serialise_stats().

◆ set_enquire()

void Xapian::MSet::Internal::set_enquire ( const Xapian::Enquire::Internal enquire_)
inline

Definition at line 115 of file msetinternal.h.

References enquire.

◆ set_first()

void Xapian::MSet::Internal::set_first ( Xapian::doccount  first_)
inline

Definition at line 113 of file msetinternal.h.

References first.

◆ set_item_weight()

void Xapian::MSet::Internal::set_item_weight ( Xapian::doccount  i,
double  weight 
)

Definition at line 431 of file mset.cc.

◆ set_stats()

void Xapian::MSet::Internal::set_stats ( Xapian::Weight::Internal stats_)
inline

Definition at line 121 of file msetinternal.h.

References stats.

◆ snippet()

string Xapian::MSet::Internal::snippet ( std::string_view  text,
size_t  length,
const Xapian::Stem stemmer,
unsigned  flags,
std::string_view  hi_start,
std::string_view  hi_end,
std::string_view  omit 
) const

◆ unserialise()

void Xapian::MSet::Internal::unserialise ( const char *  p,
const char *  p_end 
)

Unserialise a serialised Xapian::MSet::Internal object.

Parameters
pPointer to the start of the string to unserialise.
p_endPointer to the end of the string to unserialise.

This object is updated with the unserialised data.

Definition at line 556 of file mset.cc.

References p, unpack_string(), unpack_throw_serialisation_error(), unpack_uint(), unserialise_double(), and unserialise_stats().

◆ unshard_docids()

void Xapian::MSet::Internal::unshard_docids ( Xapian::doccount  shard,
Xapian::doccount  n_shards 
)

Definition at line 482 of file mset.cc.

Friends And Related Function Documentation

◆ ::Matcher

friend class ::Matcher
friend

Definition at line 47 of file msetinternal.h.

◆ MSet

friend class MSet
friend

Definition at line 45 of file msetinternal.h.

◆ MSetIterator

friend class MSetIterator
friend

Definition at line 46 of file msetinternal.h.

Member Data Documentation

◆ enquire

Xapian::Internal::intrusive_ptr<const Enquire::Internal> Xapian::MSet::Internal::enquire
private

Definition at line 64 of file msetinternal.h.

Referenced by get_document(), Xapian::MSet::get_termfreq(), and set_enquire().

◆ first

Xapian::doccount Xapian::MSet::Internal::first = 0
private

Definition at line 78 of file msetinternal.h.

Referenced by set_first().

◆ items

std::vector<Result> Xapian::MSet::Internal::items
private

The items in the MSet.

Definition at line 59 of file msetinternal.h.

Referenced by get_document(), and Xapian::MSet::sort_by_relevance().

◆ matches_estimated

Xapian::doccount Xapian::MSet::Internal::matches_estimated = 0
private

Definition at line 68 of file msetinternal.h.

Referenced by Xapian::MSet::get_matches_estimated(), and merge_stats().

◆ matches_lower_bound

Xapian::doccount Xapian::MSet::Internal::matches_lower_bound = 0
private

Definition at line 66 of file msetinternal.h.

Referenced by Xapian::MSet::get_matches_estimated(), and merge_stats().

◆ matches_upper_bound

Xapian::doccount Xapian::MSet::Internal::matches_upper_bound = 0
private

Definition at line 70 of file msetinternal.h.

Referenced by Xapian::MSet::get_matches_estimated(), and merge_stats().

◆ max_attained

double Xapian::MSet::Internal::max_attained = 0
private

Definition at line 82 of file msetinternal.h.

Referenced by merge_stats().

◆ max_possible

double Xapian::MSet::Internal::max_possible = 0
private

Definition at line 80 of file msetinternal.h.

Referenced by merge_stats().

◆ percent_scale_factor

double Xapian::MSet::Internal::percent_scale_factor = 0
private

Scale factor to convert weights to percentages.

Definition at line 85 of file msetinternal.h.

Referenced by get_percent_scale_factor(), and merge_stats().

◆ snippet_bg_relevance

std::unordered_map<std::string, double> Xapian::MSet::Internal::snippet_bg_relevance
mutableprivate

Relevance weights for non-query terms for generating snippets.

Definition at line 56 of file msetinternal.h.

Referenced by merge_stats().

◆ stats

std::unique_ptr<Xapian::Weight::Internal> Xapian::MSet::Internal::stats
private

For looking up query term frequencies and weights.

Definition at line 62 of file msetinternal.h.

Referenced by get_stats(), Xapian::MSet::get_termfreq(), Xapian::MSet::get_termweight(), and set_stats().

◆ uncollapsed_estimated

Xapian::doccount Xapian::MSet::Internal::uncollapsed_estimated = 0
private

Definition at line 74 of file msetinternal.h.

Referenced by Xapian::MSet::get_uncollapsed_matches_estimated(), and merge_stats().

◆ uncollapsed_lower_bound

Xapian::doccount Xapian::MSet::Internal::uncollapsed_lower_bound = 0
private

Definition at line 72 of file msetinternal.h.

Referenced by Xapian::MSet::get_uncollapsed_matches_estimated(), and merge_stats().

◆ uncollapsed_upper_bound

Xapian::doccount Xapian::MSet::Internal::uncollapsed_upper_bound = 0
private

Definition at line 76 of file msetinternal.h.

Referenced by Xapian::MSet::get_uncollapsed_matches_estimated(), and merge_stats().


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