xapian-core
1.4.27
|
Classes | |
class | BItem |
class | BItem_base |
class | BItem_wr |
class | Cursor |
struct | fragment |
class | Key |
class | LeafItem |
class | LeafItem_base |
class | LeafItem_wr |
class | PostlistChunkReader |
PostlistChunkReader is essentially an iterator wrapper around a postlist chunk. More... | |
class | PostlistChunkWriter |
PostlistChunkWriter is a wrapper which acts roughly as an output iterator on a postlist chunk, taking care of the messy details. More... | |
class | RootInfo |
class | ValueChunkReader |
class | ValueUpdater |
Enumerations | |
enum | table_type { POSTLIST, DOCDATA, TERMLIST, POSITION, SPELLING, SYNONYM, MAX_ } |
Functions | |
uint4 | REVISION (const uint8_t *b) |
int | GET_LEVEL (const uint8_t *b) |
int | MAX_FREE (const uint8_t *b) |
int | TOTAL_FREE (const uint8_t *b) |
int | DIR_END (const uint8_t *b) |
void | SET_REVISION (uint8_t *b, uint4 rev) |
void | SET_LEVEL (uint8_t *b, int x) |
void | SET_MAX_FREE (uint8_t *b, int x) |
void | SET_TOTAL_FREE (uint8_t *b, int x) |
void | SET_DIR_END (uint8_t *b, int x) |
template<typename ITEM1 , typename ITEM2 > | |
int | compare (ITEM1 a, ITEM2 b) |
Compare two items by their keys. More... | |
int | compare (BItem a, BItem b) |
Compare two BItem objects by their keys. More... | |
std::string | make_valuechunk_key (Xapian::valueno slot, Xapian::docid did) |
Generate a key for a value stream chunk. More... | |
Xapian::docid | docid_from_key (Xapian::valueno required_slot, const std::string &key) |
Variables | |
const size_t | BLOCK_CAPACITY = 4 |
Even for items of at maximum size, it must be possible to get this number of items in a block. More... | |
const int | BYTES_PER_BLOCK_NUMBER = 4 |
const int | K1 = 1 |
const int | I2 = 2 |
const int | D2 = 2 |
const int | X2 = 2 |
const int | DIR_START = 11 |
const int | I_COMPRESSED_BIT = 0x80 |
const int | I_LAST_BIT = 0x40 |
const int | I_FIRST_BIT = 0x20 |
const int | I_MASK = (I_COMPRESSED_BIT|I_LAST_BIT|I_FIRST_BIT) |
const int | ITEM_SIZE_MASK = (0xffff &~ (I_MASK << 8)) |
const size_t | MAX_ITEM_SIZE = (ITEM_SIZE_MASK + 3) |
const int | LEVEL_FREELIST = 254 |
Freelist blocks have their level set to LEVEL_FREELIST. More... | |
enum Glass::table_type |
Enumerator | |
---|---|
POSTLIST | |
DOCDATA | |
TERMLIST | |
POSITION | |
SPELLING | |
SYNONYM | |
MAX_ |
Definition at line 53 of file glass_defs.h.
int Glass::compare | ( | ITEM1 | a, |
ITEM2 | b | ||
) |
Compare two items by their keys.
The result is negative if a precedes b, positive is b precedes a, and 0 if a and b are equal. The comparison is for byte sequence collating order, taking lengths into account. So if the keys are made up of lower case ASCII letters we get alphabetical ordering.
Now remember that items are added into the B-tree in fastest time when they are preordered by their keys. This is therefore the piece of code that needs to be followed to arrange for the preordering.
Note that keys have two parts - a string value and a "component_of" count. If the string values are equal, the comparison is made based on "component_of".
Definition at line 930 of file glass_table.h.
References Glass::Key::data(), and Glass::Key::length().
Referenced by GlassTableCheck::block_check(), GlassTable::enter_key_above_leaf(), find_in_branch_(), and GlassTable::find_in_leaf().
Compare two BItem objects by their keys.
Specialisation for comparing two BItems, where component_of is always explicitly stored.
Definition at line 959 of file glass_table.h.
References Glass::Key::data(), Glass::BItem_base< T >::key(), Glass::Key::length(), and X2.
|
inline |
Definition at line 114 of file glass_table.h.
References unaligned_read2().
Referenced by GlassTable::add_branch_item(), GlassTable::add_item_to_branch(), GlassTable::add_item_to_leaf(), GlassTable::add_kt(), GlassTable::add_leaf_item(), GlassTableCheck::block_check(), GlassTableCheck::block_usage(), GlassTable::compact(), GlassTable::delete_branch_item(), GlassTable::delete_leaf_item(), find_in_branch_(), GlassTable::find_in_leaf(), GlassTable::mid_point(), GlassTable::read_block(), GlassTableCheck::report_block(), and GlassTableCheck::report_block_full().
|
inline |
Definition at line 50 of file glass_values.h.
References unpack_uint(), and unpack_uint_preserving_sort().
Referenced by Glass::ValueUpdater::update(), and GlassValueList::update_reader().
|
inline |
Definition at line 111 of file glass_table.h.
Referenced by GlassTableCheck::block_check(), GlassTable::block_to_cursor(), GlassTable::compact(), GlassTable::mid_point(), GlassTable::read_block(), GlassTableCheck::report_block(), and GlassTableCheck::report_block_full().
|
inline |
Generate a key for a value stream chunk.
Definition at line 41 of file glass_values.h.
References pack_uint(), and pack_uint_preserving_sort().
Referenced by GlassValueList::check(), GlassValueManager::get_chunk_containing_did(), GlassValueList::next(), GlassValueList::skip_to(), Glass::ValueUpdater::update(), and Glass::ValueUpdater::write_tag().
|
inline |
Definition at line 112 of file glass_table.h.
References unaligned_read2().
Referenced by GlassTable::add_branch_item(), GlassTable::add_item_to_branch(), GlassTable::add_item_to_leaf(), GlassTable::add_kt(), GlassTable::add_leaf_item(), GlassTableCheck::block_check(), GlassTable::delete_branch_item(), and GlassTable::delete_leaf_item().
|
inline |
Definition at line 110 of file glass_table.h.
References aligned_read4().
Referenced by GlassTable::alter(), GlassTableCheck::block_check(), GlassTable::block_to_cursor(), GlassTable::read_root(), GlassTableCheck::report_block(), GlassTableCheck::report_block_full(), and GlassTable::write_block().
|
inline |
Definition at line 121 of file glass_table.h.
References unaligned_write2().
Referenced by GlassTable::add_branch_item(), GlassTable::add_item_to_branch(), GlassTable::add_item_to_leaf(), GlassTable::add_leaf_item(), GlassTable::delete_branch_item(), GlassTable::delete_leaf_item(), GlassTable::read_root(), and GlassTable::split_root().
|
inline |
Definition at line 118 of file glass_table.h.
References AssertRel.
Referenced by GlassTable::read_root(), and GlassTable::split_root().
|
inline |
Definition at line 119 of file glass_table.h.
References unaligned_write2().
Referenced by GlassTable::add_item_to_branch(), GlassTable::add_item_to_leaf(), GlassTable::add_kt(), GlassTable::compact(), GlassTable::delete_branch_item(), GlassTable::delete_leaf_item(), and GlassTable::read_root().
|
inline |
Definition at line 117 of file glass_table.h.
References aligned_write4().
Referenced by GlassTable::alter(), GlassTable::read_root(), and GlassTable::split_root().
|
inline |
Definition at line 120 of file glass_table.h.
References unaligned_write2().
Referenced by GlassTable::add_branch_item(), GlassTable::add_item_to_branch(), GlassTable::add_item_to_leaf(), GlassTable::add_kt(), GlassTable::compact(), GlassTable::delete_branch_item(), GlassTable::delete_leaf_item(), and GlassTable::read_root().
|
inline |
Definition at line 113 of file glass_table.h.
References unaligned_read2().
Referenced by GlassTable::add(), GlassTable::add_branch_item(), GlassTable::add_item_to_branch(), GlassTable::add_item_to_leaf(), GlassTable::add_kt(), GlassTable::add_leaf_item(), GlassTableCheck::block_check(), GlassTableCheck::block_usage(), GlassTable::delete_branch_item(), GlassTable::delete_leaf_item(), and GlassTable::mid_point().
const size_t Glass::BLOCK_CAPACITY = 4 |
Even for items of at maximum size, it must be possible to get this number of items in a block.
Definition at line 50 of file glass_table.h.
Referenced by GlassTable::basic_open(), and GlassTable::set_max_item_size().
const int Glass::BYTES_PER_BLOCK_NUMBER = 4 |
Definition at line 60 of file glass_table.h.
Referenced by GlassTable::enter_key_above_branch(), GlassTable::enter_key_above_leaf(), Glass::BItem_base< uint8_t *>::get_key_len(), Glass::BItem_wr::set_key_len(), and Glass::BItem_base< uint8_t *>::size().
const int Glass::D2 = 2 |
Definition at line 74 of file glass_table.h.
Referenced by GlassTable::add(), GlassTable::add_branch_item(), GlassTable::add_item_to_branch(), GlassTable::add_item_to_leaf(), GlassTable::add_kt(), GlassTable::add_leaf_item(), GlassTableCheck::block_check(), GlassTable::compact(), GlassTable::delete_branch_item(), GlassTable::delete_leaf_item(), GlassTable::enter_key_above_branch(), GlassTable::enter_key_above_leaf(), failure(), find_in_branch_(), GlassTable::find_in_leaf(), GlassTable::mid_point(), GlassTable::read_root(), GlassTableCheck::report_block(), GlassTableCheck::report_block_full(), and GlassTable::set_max_item_size().
const int Glass::DIR_START = 11 |
Definition at line 115 of file glass_table.h.
Referenced by GlassTable::add_branch_item(), GlassTable::add_item_to_branch(), GlassTable::add_item_to_leaf(), GlassTable::add_kt(), GlassTable::add_leaf_item(), GlassTableCheck::block_check(), GlassTable::compact(), GlassTable::delete_branch_item(), GlassTable::delete_leaf_item(), GlassTable::do_open_to_write(), failure(), find_in_branch_(), GlassTable::find_in_leaf(), GlassTable::mid_point(), GlassTable::read_block(), GlassTable::read_root(), GlassTableCheck::report_block(), GlassTableCheck::report_block_full(), GlassTable::set_max_item_size(), and GlassTable::split_root().
const int Glass::I2 = 2 |
Definition at line 73 of file glass_table.h.
Referenced by GlassTable::add(), Glass::LeafItem_base< uint8_t *>::get_key_len(), GlassTable::read_root(), and Glass::LeafItem_wr::set_key_len().
const int Glass::I_COMPRESSED_BIT = 0x80 |
Definition at line 126 of file glass_table.h.
Referenced by Glass::LeafItem_base< uint8_t *>::get_compressed(), and Glass::LeafItem_wr::set_tag().
const int Glass::I_FIRST_BIT = 0x20 |
Definition at line 128 of file glass_table.h.
Referenced by Glass::LeafItem_base< uint8_t *>::first_component(), Glass::LeafItem_wr::form_key(), Glass::LeafItem_wr::set_component_of(), and Glass::LeafItem_wr::set_tag().
const int Glass::I_LAST_BIT = 0x40 |
Definition at line 127 of file glass_table.h.
Referenced by Glass::LeafItem_wr::fake_root_item(), Glass::LeafItem_base< uint8_t *>::last_component(), and Glass::LeafItem_wr::set_tag().
const int Glass::I_MASK = (I_COMPRESSED_BIT|I_LAST_BIT|I_FIRST_BIT) |
Definition at line 130 of file glass_table.h.
const int Glass::ITEM_SIZE_MASK = (0xffff &~ (I_MASK << 8)) |
Definition at line 132 of file glass_table.h.
const int Glass::K1 = 1 |
Definition at line 72 of file glass_table.h.
Referenced by GlassTable::add(), Glass::LeafItem_base< uint8_t *>::append_chunk(), Glass::Key::data(), Glass::LeafItem_base< uint8_t *>::decompress_chunk(), GlassTable::enter_key_above_branch(), GlassTable::enter_key_above_leaf(), Glass::Key::operator[](), GlassTable::read_root(), and Glass::BItem_wr::set_truncated_key_and_block().
const int Glass::LEVEL_FREELIST = 254 |
Freelist blocks have their level set to LEVEL_FREELIST.
Definition at line 136 of file glass_table.h.
Referenced by GlassFreeList::read_block(), GlassTable::read_block(), and GlassFreeList::write_block().
const size_t Glass::MAX_ITEM_SIZE = (ITEM_SIZE_MASK + 3) |
Definition at line 133 of file glass_table.h.
Referenced by GlassTable::set_max_item_size().
const int Glass::X2 = 2 |
Definition at line 75 of file glass_table.h.
Referenced by GlassTable::add(), Glass::LeafItem_base< uint8_t *>::append_chunk(), compare(), Glass::LeafItem_base< uint8_t *>::decompress_chunk(), GlassTable::enter_key_above_branch(), GlassTable::enter_key_above_leaf(), and Glass::BItem_wr::set_key_and_block().