xapian-core
1.4.26
|
#include <config.h>
#include "chert_postlist.h"
#include "chert_cursor.h"
#include "chert_database.h"
#include "debuglog.h"
#include "noreturn.h"
#include "pack.h"
#include "str.h"
Go to the source code of this file.
Classes | |
class | Chert::PostlistChunkWriter |
PostlistChunkWriter is a wrapper which acts roughly as an output iterator on a postlist chunk, taking care of the messy details. More... | |
class | Chert::PostlistChunkReader |
PostlistChunkReader is essentially an iterator wrapper around a postlist chunk. More... | |
Functions | |
static void | report_read_error (const char *position) |
Report an error when reading the posting list. More... | |
static bool | get_tname_from_key (const char **src, const char *end, string &tname) |
static bool | check_tname_in_key_lite (const char **keypos, const char *keyend, const string &tname) |
static bool | check_tname_in_key (const char **keypos, const char *keyend, const string &tname) |
static Xapian::docid | read_start_of_first_chunk (const char **posptr, const char *end, Xapian::doccount *number_of_entries_ptr, Xapian::termcount *collection_freq_ptr) |
Read the start of the first chunk in the posting list. More... | |
static void | read_did_increase (const char **posptr, const char *end, Xapian::docid *did_ptr) |
static void | read_wdf (const char **posptr, const char *end, Xapian::termcount *wdf_ptr) |
Read the wdf for an entry. More... | |
static Xapian::docid | read_start_of_chunk (const char **posptr, const char *end, Xapian::docid first_did_in_chunk, bool *is_last_chunk_ptr) |
Read the start of a chunk. More... | |
static string | make_start_of_first_chunk (Xapian::doccount entries, Xapian::termcount collectionfreq, Xapian::docid new_did) |
Make the data to go at the start of the very first chunk. More... | |
static string | make_start_of_chunk (bool new_is_last_chunk, Xapian::docid new_first_did, Xapian::docid new_final_did) |
Make the data to go at the start of a standard chunk. More... | |
static void | write_start_of_chunk (string &chunk, unsigned int start_of_chunk_header, unsigned int end_of_chunk_header, bool is_last_chunk, Xapian::docid first_did_in_chunk, Xapian::docid last_did_in_chunk) |
Variables | |
const unsigned int | CHUNKSIZE = 2000 |
|
inlinestatic |
Definition at line 177 of file chert_postlist.cc.
References check_tname_in_key_lite().
Referenced by Chert::PostlistChunkWriter::flush(), and ChertPostListTable::get_chunk().
|
inlinestatic |
Definition at line 160 of file chert_postlist.cc.
References get_tname_from_key(), and report_read_error().
Referenced by check_tname_in_key(), ChertPostListTable::get_used_docid_range(), ChertPostListTable::merge_changes(), ChertPostList::move_to_chunk_containing(), and ChertPostList::next_chunk().
|
inlinestatic |
Definition at line 153 of file chert_postlist.cc.
References unpack_string_preserving_sort().
Referenced by check_tname_in_key_lite().
|
inlinestatic |
Make the data to go at the start of a standard chunk.
Definition at line 361 of file chert_postlist.cc.
References Assert, Chert::PostlistChunkWriter::chunk, pack_bool(), and pack_uint().
Referenced by Chert::PostlistChunkWriter::flush(), ChertPostListTable::merge_changes(), and write_start_of_chunk().
|
inlinestatic |
Make the data to go at the start of the very first chunk.
Definition at line 347 of file chert_postlist.cc.
References Chert::PostlistChunkWriter::chunk, and pack_uint().
Referenced by Chert::PostlistChunkWriter::flush(), and ChertPostListTable::merge_changes().
|
inlinestatic |
Definition at line 210 of file chert_postlist.cc.
References report_read_error(), and unpack_uint().
Referenced by ChertPostList::move_forward_in_chunk_to_at_least(), Chert::PostlistChunkReader::next(), and ChertPostList::next_in_chunk().
|
static |
Read the start of a chunk.
Definition at line 227 of file chert_postlist.cc.
References Assert, LOGCALL_STATIC, LOGVALUE, report_read_error(), RETURN, unpack_bool(), and unpack_uint().
Referenced by ChertPostList::ChertPostList(), Chert::PostlistChunkWriter::flush(), ChertPostListTable::get_chunk(), ChertPostListTable::get_used_docid_range(), ChertPostListTable::merge_changes(), ChertPostList::move_to_chunk_containing(), and ChertPostList::next_chunk().
|
static |
Read the start of the first chunk in the posting list.
Definition at line 186 of file chert_postlist.cc.
References LOGCALL_STATIC, LOGVALUE, ChertPostList::read_number_of_entries(), report_read_error(), RETURN, and unpack_uint().
Referenced by ChertPostList::ChertPostList(), Chert::PostlistChunkWriter::flush(), ChertPostListTable::get_chunk(), ChertPostListTable::get_used_docid_range(), ChertPostListTable::merge_changes(), and ChertPostList::move_to_chunk_containing().
|
inlinestatic |
Read the wdf for an entry.
Definition at line 220 of file chert_postlist.cc.
References report_read_error(), and unpack_uint().
Referenced by ChertPostList::ChertPostList(), ChertPostList::move_forward_in_chunk_to_at_least(), ChertPostList::move_to_chunk_containing(), Chert::PostlistChunkReader::next(), ChertPostList::next_chunk(), ChertPostList::next_in_chunk(), and Chert::PostlistChunkReader::PostlistChunkReader().
|
static |
Report an error when reading the posting list.
Definition at line 141 of file chert_postlist.cc.
References LOGLINE.
Referenced by check_tname_in_key_lite(), Chert::PostlistChunkWriter::flush(), ChertPostListTable::get_chunk(), ChertPostListTable::get_used_docid_range(), ChertPostList::move_to_chunk_containing(), ChertPostList::next_chunk(), read_did_increase(), ChertPostList::read_number_of_entries(), read_start_of_chunk(), read_start_of_first_chunk(), and read_wdf().
|
static |
Definition at line 373 of file chert_postlist.cc.
References Assert, and make_start_of_chunk().
Referenced by Chert::PostlistChunkWriter::flush().
const unsigned int CHUNKSIZE = 2000 |
Definition at line 85 of file chert_postlist.cc.
Referenced by Chert::PostlistChunkWriter::append().