|
xapian-core
2.0.0
|
#include <honey_positionlist.h>
Inheritance diagram for HoneyPositionTable:
Collaboration diagram for HoneyPositionTable:Public Member Functions | |
| HoneyPositionTable (const std::string &dbdir, bool readonly) | |
| Create a new HoneyPositionTable object. More... | |
| HoneyPositionTable (int fd, off_t offset_, bool readonly_) | |
| HoneyPositionList * | open_position_list (Xapian::docid did, std::string_view term) const |
| void | pack (std::string &s, const Xapian::VecCOW< Xapian::termpos > &vec) const |
| Pack a position list into a string. More... | |
| void | set_positionlist (Xapian::docid did, std::string_view tname, std::string_view s) |
| Set the position list for term tname in document did. More... | |
| void | delete_positionlist (Xapian::docid did, std::string_view tname) |
| Delete the position list for term tname in document did. More... | |
| Xapian::termcount | positionlist_count (Xapian::docid did, std::string_view term) const |
| Return the number of entries in specified position list. More... | |
Public Member Functions inherited from HoneyLazyTable | |
| HoneyLazyTable (const char *name_, const std::string &path_, bool readonly) | |
| Create a new lazy table. More... | |
| HoneyLazyTable (const char *name_, int fd, off_t offset_, bool readonly) | |
Public Member Functions inherited from HoneyTable | |
| HoneyTable (const char *, const std::string &path_, bool read_only_, bool lazy_=false) | |
| HoneyTable (const char *, int fd, off_t offset_, bool read_only_, bool lazy_=false) | |
| ~HoneyTable () | |
| bool | is_writable () const |
| int | get_flags () const |
| void | create_and_open (int flags_, const Honey::RootInfo &root_info) |
| void | open (int flags_, const Honey::RootInfo &root_info, honey_revision_number_t) |
| void | close (bool permanent) |
| const std::string & | get_path () const |
| void | add (std::string_view key, const char *val, size_t val_size, bool compressed=false) |
| void | add (std::string_view key, std::string_view val, bool compressed=false) |
| void | flush_db () |
| void | cancel (const Honey::RootInfo &, honey_revision_number_t) |
| void | commit (honey_revision_number_t, Honey::RootInfo *root_info) |
| bool | sync () |
| bool | empty () const |
| bool | get_exact_entry (std::string_view key, std::string &tag) const |
| bool | key_exists (const std::string &key) const |
| bool | del (const std::string &) |
| bool | readahead_key (const std::string &) const |
| bool | is_modified () const |
| HoneyCursor * | cursor_get () const |
| bool | exists () const |
| bool | is_open () const |
| honey_tablesize_t | get_entry_count () const |
| honey_tablesize_t | get_approx_entry_count () const |
| Return an approximation of the number of entries in the table. More... | |
| off_t | get_root () const |
| off_t | get_offset () const |
Static Public Member Functions | |
| static std::string | make_key (Xapian::docid did, std::string_view term) |
Static Public Member Functions inherited from HoneyTable | |
| static void | throw_database_closed () |
Definition at line 130 of file honey_positionlist.h.
|
inline |
Create a new HoneyPositionTable object.
This method does not create or open the table on disk - you must call the create() or open() methods respectively!
| dbdir | The directory the honey database is stored in. |
| readonly | true if we're opening read-only, else false. |
Definition at line 147 of file honey_positionlist.h.
|
inline |
Definition at line 150 of file honey_positionlist.h.
|
inline |
Delete the position list for term tname in document did.
Definition at line 176 of file honey_positionlist.h.
References HoneyTable::del(), and make_key().
Referenced by HoneyInverter::flush_pos_lists().
|
inlinestatic |
Definition at line 132 of file honey_positionlist.h.
References pack_string_preserving_sort(), pack_uint_preserving_sort(), and term.
Referenced by delete_positionlist(), open_position_list(), HoneyRePositionList::read_data(), set_positionlist(), and HoneyInverter::store_positions().
|
inline |
Definition at line 153 of file honey_positionlist.h.
References HoneyTable::get_exact_entry(), make_key(), and term.
Referenced by HoneyPostList::open_position_list(), and HoneyDatabase::open_position_list().
| void HoneyPositionTable::pack | ( | std::string & | s, |
| const Xapian::VecCOW< Xapian::termpos > & | vec | ||
| ) | const |
Pack a position list into a string.
| s | The string to append the position list data to. |
Definition at line 37 of file honey_positionlist.cc.
References Assert, Xapian::Vec< T, COW, UNIQUEPTR, typename >::back(), Xapian::Vec< T, COW, UNIQUEPTR, typename >::empty(), Xapian::BitWriter::encode(), Xapian::BitWriter::encode_interpolative(), Xapian::BitWriter::freeze(), LOGCALL_VOID, pack_uint(), and Xapian::Vec< T, COW, UNIQUEPTR, typename >::size().
Referenced by HoneyInverter::store_positions().
| Xapian::termcount HoneyPositionTable::positionlist_count | ( | Xapian::docid | did, |
| std::string_view | term | ||
| ) | const |
Return the number of entries in specified position list.
Definition at line 55 of file honey_positionlist.cc.
References Xapian::BitReader::decode(), LOGCALL, pos, RETURN, term, and unpack_uint().
Referenced by HoneyTermList::positionlist_count().
|
inline |
Set the position list for term tname in document did.
Definition at line 170 of file honey_positionlist.h.
References HoneyTable::add(), and make_key().
Referenced by HoneyInverter::flush_pos_lists().