xapian-core
1.4.27
|
Postlists in a glass database. More...
#include <config.h>
#include "glass_postlist.h"
#include "glass_cursor.h"
#include "glass_database.h"
#include "debuglog.h"
#include "noreturn.h"
#include "pack.h"
#include "str.h"
#include "unicode/description_append.h"
Go to the source code of this file.
Classes | |
class | Glass::PostlistChunkWriter |
PostlistChunkWriter is a wrapper which acts roughly as an output iterator on a postlist chunk, taking care of the messy details. More... | |
class | Glass::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 |
Postlists in a glass database.
Definition in file glass_postlist.cc.
|
inlinestatic |
Definition at line 79 of file glass_postlist.cc.
References check_tname_in_key_lite().
Referenced by Glass::PostlistChunkWriter::flush(), and GlassPostListTable::get_chunk().
|
inlinestatic |
Definition at line 62 of file glass_postlist.cc.
References get_tname_from_key(), and report_read_error().
Referenced by check_tname_in_key(), GlassPostListTable::get_used_docid_range(), GlassPostListTable::merge_changes(), GlassPostList::move_to_chunk_containing(), and GlassPostList::next_chunk().
|
inlinestatic |
Definition at line 56 of file glass_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 390 of file glass_postlist.cc.
References Assert, Glass::PostlistChunkWriter::chunk, pack_bool(), and pack_uint().
Referenced by Glass::PostlistChunkWriter::flush(), GlassPostListTable::merge_changes(), GlassPostListTable::merge_doclen_changes(), and write_start_of_chunk().
|
inlinestatic |
Make the data to go at the start of the very first chunk.
Definition at line 376 of file glass_postlist.cc.
References Glass::PostlistChunkWriter::chunk, and pack_uint().
Referenced by Glass::PostlistChunkWriter::flush(), GlassPostListTable::merge_changes(), and GlassPostListTable::merge_doclen_changes().
|
inlinestatic |
Definition at line 113 of file glass_postlist.cc.
References report_read_error(), and unpack_uint().
Referenced by GlassPostList::move_forward_in_chunk_to_at_least(), Glass::PostlistChunkReader::next(), and GlassPostList::next_in_chunk().
|
static |
Read the start of a chunk.
Definition at line 130 of file glass_postlist.cc.
References Assert, LOGCALL_STATIC, LOGVALUE, report_read_error(), RETURN, unpack_bool(), and unpack_uint().
Referenced by Glass::PostlistChunkWriter::flush(), GlassPostListTable::get_chunk(), GlassPostListTable::get_freqs(), GlassPostListTable::get_used_docid_range(), GlassPostList::init(), GlassPostListTable::merge_changes(), GlassPostList::move_to_chunk_containing(), and GlassPostList::next_chunk().
|
static |
Read the start of the first chunk in the posting list.
Definition at line 88 of file glass_postlist.cc.
References LOGCALL_STATIC, LOGVALUE, GlassPostList::read_number_of_entries(), report_read_error(), RETURN, and unpack_uint().
Referenced by Glass::PostlistChunkWriter::flush(), GlassPostListTable::get_chunk(), GlassPostListTable::get_used_docid_range(), GlassPostList::init(), GlassPostListTable::merge_changes(), and GlassPostList::move_to_chunk_containing().
|
inlinestatic |
Read the wdf for an entry.
Definition at line 123 of file glass_postlist.cc.
References report_read_error(), and unpack_uint().
Referenced by GlassPostList::init(), GlassPostList::move_forward_in_chunk_to_at_least(), GlassPostList::move_to_chunk_containing(), Glass::PostlistChunkReader::next(), GlassPostList::next_chunk(), GlassPostList::next_in_chunk(), and Glass::PostlistChunkReader::PostlistChunkReader().
|
static |
Report an error when reading the posting list.
Definition at line 42 of file glass_postlist.cc.
References LOGLINE.
Referenced by check_tname_in_key_lite(), Glass::PostlistChunkWriter::flush(), GlassPostListTable::get_chunk(), GlassPostListTable::get_freqs(), GlassPostListTable::get_used_docid_range(), GlassPostList::move_to_chunk_containing(), GlassPostList::next_chunk(), read_did_increase(), GlassPostList::read_number_of_entries(), read_start_of_chunk(), read_start_of_first_chunk(), and read_wdf().
|
static |
Definition at line 402 of file glass_postlist.cc.
References Assert, and make_start_of_chunk().
Referenced by Glass::PostlistChunkWriter::flush().
const unsigned int CHUNKSIZE = 2000 |
Definition at line 226 of file glass_postlist.cc.
Referenced by Glass::PostlistChunkWriter::append().