xapian-core
1.4.26
|
#include <chert_values.h>
Private Member Functions | |
void | add_value (Xapian::docid did, Xapian::valueno slot, const std::string &val) |
void | remove_value (Xapian::docid did, Xapian::valueno slot) |
Xapian::docid | get_chunk_containing_did (Xapian::valueno slot, Xapian::docid did, std::string &chunk) const |
void | get_value_stats (Xapian::valueno slot) const |
Get the statistics for value slot slot. More... | |
void | get_value_stats (Xapian::valueno slot, ValueStats &stats) const |
Private Attributes | |
Xapian::valueno | mru_slot |
The value number for the most recently used value statistics. More... | |
ValueStats | mru_valstats |
The most recently used value statistics. More... | |
ChertPostListTable * | postlist_table |
ChertTermListTable * | termlist_table |
std::map< Xapian::docid, std::string > | slots |
std::map< Xapian::valueno, std::map< Xapian::docid, std::string > > | changes |
AutoPtr< ChertCursor > | cursor |
Definition at line 73 of file chert_values.h.
|
inline |
Create a new ChertValueManager object.
Definition at line 110 of file chert_values.h.
void ChertValueManager::add_document | ( | Xapian::docid | did, |
const Xapian::Document & | doc, | ||
std::map< Xapian::valueno, ValueStats > & | value_stats | ||
) |
Definition at line 353 of file chert_values.cc.
References Assert, ValueStats::freq, Xapian::ValueIterator::get_valueno(), ValueStats::lower_bound, pack_uint(), ValueStats::upper_bound, Xapian::Document::values_begin(), and Xapian::Document::values_end().
Referenced by ChertWritableDatabase::add_document_().
|
private |
Definition at line 132 of file chert_values.cc.
|
inline |
Definition at line 166 of file chert_values.h.
Referenced by ChertDatabase::cancel().
void ChertValueManager::delete_document | ( | Xapian::docid | did, |
std::map< Xapian::valueno, ValueStats > & | value_stats | ||
) |
Definition at line 405 of file chert_values.cc.
References Assert, AssertRelParanoid, ValueStats::freq, ValueStats::lower_bound, make_slot_key(), unpack_uint(), and ValueStats::upper_bound.
Referenced by ChertWritableDatabase::delete_document().
void ChertValueManager::get_all_values | ( | std::map< Xapian::valueno, std::string > & | values, |
Xapian::docid | did | ||
) | const |
Definition at line 485 of file chert_values.cc.
References Assert, make_slot_key(), ChertTable::throw_database_closed(), and unpack_uint().
Referenced by ChertDocument::do_get_all_values().
|
private |
Definition at line 155 of file chert_values.cc.
References C_unpack_uint_preserving_sort(), LOGCALL, make_valuechunk_key(), RETURN, and unpack_uint().
string ChertValueManager::get_value | ( | Xapian::docid | did, |
Xapian::valueno | slot | ||
) | const |
Definition at line 462 of file chert_values.cc.
References ValueChunkReader::skip_to().
Referenced by ChertDocument::do_get_value().
|
inline |
Definition at line 133 of file chert_values.h.
References ValueStats::freq.
Referenced by ChertDatabase::get_value_freq().
|
inline |
Definition at line 138 of file chert_values.h.
References ValueStats::lower_bound.
Referenced by ChertDatabase::get_value_lower_bound().
|
private |
Get the statistics for value slot slot.
Definition at line 519 of file chert_values.cc.
References Xapian::BAD_VALUENO, and LOGCALL_VOID.
|
private |
Definition at line 529 of file chert_values.cc.
References Assert, Xapian::BAD_VALUENO, ValueStats::clear(), ValueStats::freq, LOGCALL_VOID, ValueStats::lower_bound, make_valuestats_key(), unpack_string(), unpack_uint(), and ValueStats::upper_bound.
|
inline |
Definition at line 143 of file chert_values.h.
References ValueStats::upper_bound.
Referenced by ChertDatabase::get_value_upper_bound().
|
inline |
Definition at line 162 of file chert_values.h.
Referenced by ChertDatabase::apply(), and ChertWritableDatabase::has_uncommitted_changes().
void ChertValueManager::merge_changes | ( | ) |
Definition at line 321 of file chert_values.cc.
References make_slot_key(), and ValueUpdater::update().
Referenced by ChertWritableDatabase::open_value_list(), and ChertDatabase::set_revision_number().
|
private |
Definition at line 144 of file chert_values.cc.
void ChertValueManager::replace_document | ( | Xapian::docid | did, |
const Xapian::Document & | doc, | ||
std::map< Xapian::valueno, ValueStats > & | value_stats | ||
) |
Definition at line 449 of file chert_values.cc.
References Xapian::Document::internal.
Referenced by ChertWritableDatabase::replace_document().
|
inline |
Ignore any old cached valuestats.
Definition at line 157 of file chert_values.h.
References Xapian::BAD_VALUENO.
Referenced by ChertDatabase::open_tables(), and ChertDatabase::open_tables_consistent().
void ChertValueManager::set_value_stats | ( | std::map< Xapian::valueno, ValueStats > & | value_stats | ) |
Write the updated statistics to the table.
If the freq member of the statistics for a particular slot is 0, the statistics for that slot will be cleared.
value_stats | The statistics to set. |
Definition at line 570 of file chert_values.cc.
References Xapian::BAD_VALUENO, ValueStats::freq, LOGCALL_VOID, ValueStats::lower_bound, make_valuestats_key(), pack_string(), pack_uint(), and ValueStats::upper_bound.
Referenced by ChertWritableDatabase::apply().
|
private |
Definition at line 90 of file chert_values.h.
|
mutableprivate |
Definition at line 92 of file chert_values.h.
|
mutableprivate |
The value number for the most recently used value statistics.
Set to Xapian::BAD_VALUENO if no value statistics are currently cached.
Definition at line 79 of file chert_values.h.
|
mutableprivate |
The most recently used value statistics.
Definition at line 82 of file chert_values.h.
|
private |
Definition at line 84 of file chert_values.h.
|
private |
Definition at line 88 of file chert_values.h.
|
private |
Definition at line 86 of file chert_values.h.