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

A result in an MSet. More...

#include <result.h>

+ Collaboration diagram for Result:

Public Member Functions

Resultoperator= (const Result &)=delete
 
 Result (const Result &)=delete
 
 Result (Result &&)=default
 Move constructor. More...
 
Resultoperator= (Result &&)=default
 Move assignment. More...
 
 Result (double weight_, Xapian::docid did_)
 Constructor. More...
 
 Result (double weight_, Xapian::docid did_, std::string &&collapse_key_, Xapian::doccount collapse_count_, std::string &&sort_key_)
 Constructor used by MSet::Internal::unserialise(). More...
 
void swap (Result &o)
 
Xapian::docid get_docid () const
 
double get_weight () const
 
Xapian::doccount get_collapse_count () const
 
const std::string & get_collapse_key () const
 
const std::string & get_sort_key () const
 
void set_weight (double weight_)
 
void set_collapse_count (Xapian::doccount c)
 
void set_collapse_key (const std::string &k)
 
void set_sort_key (const std::string &k)
 
void unshard_docid (Xapian::doccount shard, Xapian::doccount n_shards)
 
std::string get_description () const
 

Private Attributes

double weight
 
Xapian::docid did
 
Xapian::doccount collapse_count = 0
 
std::string collapse_key
 
std::string sort_key
 

Detailed Description

A result in an MSet.

Definition at line 30 of file result.h.

Constructor & Destructor Documentation

◆ Result() [1/4]

Result::Result ( const Result )
delete

◆ Result() [2/4]

Result::Result ( Result &&  )
default

Move constructor.

◆ Result() [3/4]

Result::Result ( double  weight_,
Xapian::docid  did_ 
)
inline

Constructor.

Definition at line 53 of file result.h.

◆ Result() [4/4]

Result::Result ( double  weight_,
Xapian::docid  did_,
std::string &&  collapse_key_,
Xapian::doccount  collapse_count_,
std::string &&  sort_key_ 
)
inline

Constructor used by MSet::Internal::unserialise().

Definition at line 57 of file result.h.

Member Function Documentation

◆ get_collapse_count()

Xapian::doccount Result::get_collapse_count ( ) const
inline

Definition at line 72 of file result.h.

References collapse_count.

◆ get_collapse_key()

const std::string& Result::get_collapse_key ( ) const
inline

Definition at line 74 of file result.h.

References collapse_key.

Referenced by Collapser::check().

◆ get_description()

string Result::get_description ( ) const

Definition at line 31 of file result.cc.

References description_append(), and Xapian::Internal::str().

◆ get_docid()

Xapian::docid Result::get_docid ( ) const
inline

◆ get_sort_key()

const std::string& Result::get_sort_key ( ) const
inline

Definition at line 76 of file result.h.

References sort_key.

Referenced by msetcmp_by_relevance_then_value(), msetcmp_by_value(), and msetcmp_by_value_then_relevance().

◆ get_weight()

double Result::get_weight ( ) const
inline

◆ operator=() [1/2]

Result& Result::operator= ( const Result )
delete

◆ operator=() [2/2]

Result& Result::operator= ( Result &&  )
default

Move assignment.

◆ set_collapse_count()

void Result::set_collapse_count ( Xapian::doccount  c)
inline

Definition at line 80 of file result.h.

References collapse_count.

◆ set_collapse_key()

void Result::set_collapse_key ( const std::string &  k)
inline

Definition at line 82 of file result.h.

References collapse_key.

Referenced by Collapser::check().

◆ set_sort_key()

void Result::set_sort_key ( const std::string &  k)
inline

Definition at line 84 of file result.h.

References sort_key.

Referenced by Matcher::get_local_mset().

◆ set_weight()

void Result::set_weight ( double  weight_)
inline

Definition at line 78 of file result.h.

References weight.

Referenced by Matcher::get_local_mset().

◆ swap()

void Result::swap ( Result o)

◆ unshard_docid()

void Result::unshard_docid ( Xapian::doccount  shard,
Xapian::doccount  n_shards 
)
inline

Definition at line 86 of file result.h.

References did, and unshard().

Member Data Documentation

◆ collapse_count

Xapian::doccount Result::collapse_count = 0
private

Definition at line 35 of file result.h.

Referenced by get_collapse_count(), and set_collapse_count().

◆ collapse_key

std::string Result::collapse_key
private

Definition at line 37 of file result.h.

Referenced by get_collapse_key(), and set_collapse_key().

◆ did

Xapian::docid Result::did
private

Definition at line 33 of file result.h.

Referenced by get_docid(), and unshard_docid().

◆ sort_key

std::string Result::sort_key
private

Definition at line 39 of file result.h.

Referenced by get_sort_key(), and set_sort_key().

◆ weight

double Result::weight
private

Definition at line 31 of file result.h.

Referenced by get_weight(), and set_weight().


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