
Public Member Functions | |
| PostlistChunkWriter (const string &orig_key_, bool is_first_chunk_, const string &tname_, bool is_last_chunk_) | |
| void | append (BrassTable *table, Xapian::docid did, Xapian::termcount wdf) |
| Append an entry to this chunk. | |
| void | raw_append (Xapian::docid first_did_, Xapian::docid current_did_, const string &s) |
| Append a block of raw entries to this chunk. | |
| void | flush (BrassTable *table) |
| Flush the chunk to the buffered table. | |
Private Attributes | |
| string | orig_key |
| string | tname |
| bool | is_first_chunk |
| bool | is_last_chunk |
| bool | started |
| Xapian::docid | first_did |
| Xapian::docid | current_did |
| string | chunk |
It's intended to be used with deletion and replacing of entries, not for adding to the end, when it's not really needed.
Definition at line 98 of file brass_postlist.cc.
| PostlistChunkWriter::PostlistChunkWriter | ( | const string & | orig_key_, | |
| bool | is_first_chunk_, | |||
| const string & | tname_, | |||
| bool | is_last_chunk_ | |||
| ) |
| void PostlistChunkWriter::append | ( | BrassTable * | table, | |
| Xapian::docid | did, | |||
| Xapian::termcount | wdf | |||
| ) |
Append an entry to this chunk.
Definition at line 323 of file brass_postlist.cc.
References Assert, chunk, CHUNKSIZE, current_did, first_did, flush(), is_first_chunk, is_last_chunk, make_key(), orig_key, pack_uint(), started, and tname.
Referenced by BrassPostListTable::merge_changes(), and BrassPostListTable::merge_doclen_changes().
| void PostlistChunkWriter::flush | ( | BrassTable * | table | ) |
Flush the chunk to the buffered table.
Note: this may write it with a different key to the original one, if for example the first entry has changed.
Definition at line 394 of file brass_postlist.cc.
References BrassTable::add(), Assert, check_tname_in_key(), chunk, current_did, BrassTable::cursor_get(), BrassTable::del(), first_did, BrassTable::get_exact_entry(), is_first_chunk, is_last_chunk, LOGCALL_VOID, LOGLINE, make_key(), make_start_of_chunk(), make_start_of_first_chunk(), orig_key, read_start_of_chunk(), read_start_of_first_chunk(), report_read_error(), started, tname, unpack_uint_preserving_sort(), and write_start_of_chunk().
Referenced by append(), BrassPostListTable::merge_changes(), and BrassPostListTable::merge_doclen_changes().
| void Brass::PostlistChunkWriter::raw_append | ( | Xapian::docid | first_did_, | |
| Xapian::docid | current_did_, | |||
| const string & | s | |||
| ) | [inline] |
Append a block of raw entries to this chunk.
Definition at line 110 of file brass_postlist.cc.
References Assert, chunk, current_did, first_did, and started.
string Brass::PostlistChunkWriter::chunk [private] |
Definition at line 137 of file brass_postlist.cc.
Referenced by append(), flush(), and raw_append().
Definition at line 135 of file brass_postlist.cc.
Referenced by append(), flush(), and raw_append().
Definition at line 134 of file brass_postlist.cc.
Referenced by append(), flush(), and raw_append().
bool Brass::PostlistChunkWriter::is_first_chunk [private] |
bool Brass::PostlistChunkWriter::is_last_chunk [private] |
string Brass::PostlistChunkWriter::orig_key [private] |
bool Brass::PostlistChunkWriter::started [private] |
Definition at line 132 of file brass_postlist.cc.
Referenced by append(), flush(), and raw_append().
string Brass::PostlistChunkWriter::tname [private] |