|
xapian-core
2.0.0
|
#include <honey_values.h>
Collaboration diagram for HoneyValueManager: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 |
| Move the cursor to the chunk containing did. More... | |
| 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 = Xapian::BAD_VALUENO |
| The value number for the most recently used value statistics. More... | |
| ValueStats | mru_valstats |
| The most recently used value statistics. More... | |
| HoneyPostListTable & | postlist_table |
| HoneyTermListTable & | termlist_table |
| std::map< Xapian::docid, std::string > | slots |
| std::map< Xapian::valueno, std::map< Xapian::docid, std::string > > | changes |
| std::unique_ptr< HoneyCursor > | cursor |
Definition at line 120 of file honey_values.h.
|
inline |
Create a new HoneyValueManager object.
Definition at line 161 of file honey_values.h.
| string HoneyValueManager::add_document | ( | Xapian::docid | did, |
| const Xapian::Document & | doc, | ||
| std::map< Xapian::valueno, ValueStats > & | val_stats | ||
| ) |
Definition at line 319 of file honey_values.cc.
References Xapian::BitWriter::encode(), Xapian::BitWriter::encode_interpolative(), Xapian::BitWriter::freeze(), ValueStats::freq, Xapian::ValueIterator::get_valueno(), Xapian::Document::internal, ValueStats::lower_bound, pack_uint(), Xapian::Vec< T, COW, UNIQUEPTR, typename >::push_back(), Xapian::Vec< T, COW, UNIQUEPTR, typename >::size(), ValueStats::upper_bound, Xapian::Document::values_begin(), and Xapian::Document::values_end().
|
private |
Definition at line 120 of file honey_values.cc.
|
inline |
Definition at line 217 of file honey_values.h.
| void HoneyValueManager::delete_document | ( | Xapian::docid | did, |
| std::map< Xapian::valueno, ValueStats > & | val_stats | ||
| ) |
Definition at line 393 of file honey_values.cc.
References Assert, AssertRelParanoid, Xapian::BitReader::decode(), Xapian::BitReader::decode_interpolative(), Xapian::BitReader::decode_interpolative_next(), ValueStats::freq, ValueStats::lower_bound, p, unpack_uint(), and ValueStats::upper_bound.
| void HoneyValueManager::get_all_values | ( | std::map< Xapian::valueno, std::string > & | values, |
| Xapian::docid | did | ||
| ) | const |
Definition at line 523 of file honey_values.cc.
References Assert, Xapian::BitReader::decode(), Xapian::BitReader::decode_interpolative(), Xapian::BitReader::decode_interpolative_next(), p, HoneyTable::throw_database_closed(), and unpack_uint().
|
private |
Move the cursor to the chunk containing did.
Definition at line 141 of file honey_values.cc.
References Honey::docid_from_key(), LOGCALL, Honey::make_valuechunk_key(), and RETURN.
| string HoneyValueManager::get_value | ( | Xapian::docid | did, |
| Xapian::valueno | slot | ||
| ) | const |
Definition at line 502 of file honey_values.cc.
References Honey::ValueChunkReader::at_end(), Honey::ValueChunkReader::get_docid(), Honey::ValueChunkReader::get_value(), and Honey::ValueChunkReader::skip_to().
|
inline |
Definition at line 184 of file honey_values.h.
References ValueStats::freq, get_value_stats(), mru_slot, and mru_valstats.
Referenced by HoneyDatabase::get_value_freq().
|
inline |
Definition at line 189 of file honey_values.h.
References get_value_stats(), ValueStats::lower_bound, mru_slot, and mru_valstats.
Referenced by HoneyDatabase::get_value_lower_bound().
|
private |
Get the statistics for value slot slot.
Definition at line 586 of file honey_values.cc.
References Xapian::BAD_VALUENO, and LOGCALL_VOID.
Referenced by get_value_freq(), get_value_lower_bound(), and get_value_upper_bound().
|
private |
Definition at line 596 of file honey_values.cc.
References ValueStats::clear(), ValueStats::freq, LOGCALL_VOID, ValueStats::lower_bound, Honey::make_valuestats_key(), pos, unpack_string(), unpack_uint(), and ValueStats::upper_bound.
|
inline |
Definition at line 194 of file honey_values.h.
References get_value_stats(), mru_slot, mru_valstats, and ValueStats::upper_bound.
Referenced by HoneyDatabase::get_value_upper_bound().
|
inline |
Definition at line 213 of file honey_values.h.
References changes.
| void HoneyValueManager::merge_changes | ( | ) |
Definition at line 306 of file honey_values.cc.
References Honey::ValueUpdater::update().
|
private |
Definition at line 131 of file honey_values.cc.
| string HoneyValueManager::replace_document | ( | Xapian::docid | did, |
| const Xapian::Document & | doc, | ||
| std::map< Xapian::valueno, ValueStats > & | val_stats | ||
| ) |
Definition at line 476 of file honey_values.cc.
References Xapian::Document::get_docid(), and Xapian::Document::internal.
|
inline |
Ignore any old cached valuestats.
Definition at line 208 of file honey_values.h.
References Xapian::BAD_VALUENO, and mru_slot.
| void HoneyValueManager::set_value_stats | ( | std::map< Xapian::valueno, ValueStats > & | val_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.
| val_stats | The statistics to set. |
Definition at line 634 of file honey_values.cc.
References Xapian::BAD_VALUENO, ValueStats::clear(), Honey::encode_valuestats(), ValueStats::freq, LOGCALL_VOID, ValueStats::lower_bound, Honey::make_valuestats_key(), and ValueStats::upper_bound.
|
private |
Definition at line 137 of file honey_values.h.
Referenced by cancel(), and is_modified().
|
mutableprivate |
Definition at line 139 of file honey_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 126 of file honey_values.h.
Referenced by get_value_freq(), get_value_lower_bound(), get_value_upper_bound(), and reset().
|
mutableprivate |
The most recently used value statistics.
Definition at line 129 of file honey_values.h.
Referenced by get_value_freq(), get_value_lower_bound(), and get_value_upper_bound().
|
private |
Definition at line 131 of file honey_values.h.
|
private |
Definition at line 135 of file honey_values.h.
Referenced by cancel().
|
private |
Definition at line 133 of file honey_values.h.