|
xapian-core
2.0.0
|
A document which gets its values from a ValueStreamManager. More...
#include <valuestreamdocument.h>
Inheritance diagram for ValueStreamDocument:
Collaboration diagram for ValueStreamDocument:Public Member Functions | |
| ValueStreamDocument (const Xapian::Database &db_) | |
| void | new_shard (Xapian::doccount n) |
| ~ValueStreamDocument () | |
| void | set_shard_document (Xapian::docid shard_did) |
| void | set_document (Xapian::docid did_) |
| std::string | get_value (Xapian::valueno slot) const |
Public Member Functions inherited from Xapian::Document::Internal | |
| Internal () | |
| Construct an empty document. More... | |
| virtual | ~Internal () |
| We have virtual methods and want to be able to delete derived classes using a pointer to the base class, so we need a virtual destructor. More... | |
| bool | data_modified () const |
| Return true if the document data might have been modified. More... | |
| bool | terms_modified () const |
| Return true if the document's terms might have been modified. More... | |
| bool | values_modified () const |
| Return true if the document's values might have been modified. More... | |
| bool | modified () const |
| Return true if the document might have been modified in any way. More... | |
| bool | positions_modified () const |
| Return true if the document's term positions might have been modified. More... | |
| Xapian::docid | get_docid () const |
| Get the document ID this document came from. More... | |
| Xapian::doccount | get_index () const |
| Internal method used by MSet::diversify(). More... | |
| void | set_index (Xapian::doccount new_index) |
| Internal method used by MSet::diversify(). More... | |
| std::string | get_data () const |
| Get the document data. More... | |
| void | set_data (std::string_view data_) |
| Set the document data. More... | |
| void | add_term (std::string_view term, Xapian::termcount wdf_inc) |
| Add a term to this document. More... | |
| bool | remove_term (std::string_view term) |
| Remove a term from this document. More... | |
| void | add_posting (std::string_view term, Xapian::termpos term_pos, Xapian::termcount wdf_inc) |
| Add a posting for a term. More... | |
| remove_posting_result | remove_posting (std::string_view term, Xapian::termpos term_pos, Xapian::termcount wdf_dec) |
| Remove a posting for a term. More... | |
| remove_posting_result | remove_postings (std::string_view term, Xapian::termpos term_pos_first, Xapian::termpos term_pos_last, Xapian::termcount wdf_dec, Xapian::termpos &n_removed) |
| Remove a range of postings for a term. More... | |
| void | clear_terms () |
| Clear all terms from the document. More... | |
| Xapian::termcount | termlist_count () const |
| Return the number of distinct terms in this document. More... | |
| TermList * | open_term_list () const |
| Start iterating the terms in this document. More... | |
| std::string | get_value (Xapian::valueno slot) const |
| Read a value slot in this document. More... | |
| void | add_value (Xapian::valueno slot, std::string_view value) |
| Add a value to a slot in this document. More... | |
| void | clear_values () |
| Clear all value slots in this document. More... | |
| Xapian::valueno | values_count () const |
| Count the value slots used in this document. More... | |
| Xapian::ValueIterator | values_begin () const |
| std::string | get_description () const |
| Return a string describing this object. More... | |
Public Member Functions inherited from Xapian::Internal::intrusive_base | |
| intrusive_base () | |
| Construct with no references. More... | |
Protected Member Functions | |
| std::string | fetch_value (Xapian::valueno slot) const |
| Implementation of virtual methods. More... | |
| void | fetch_all_values (std::map< Xapian::valueno, std::string > &values_) const |
| Implementation of virtual methods. More... | |
| std::string | fetch_data () const |
| Implementation of virtual methods. More... | |
Protected Member Functions inherited from Xapian::Document::Internal | |
| Internal (Xapian::Internal::intrusive_ptr< const Xapian::Database::Internal > database_, Xapian::docid did_) | |
| Constructor used by subclasses. More... | |
| Internal (const Xapian::Database::Internal *database_, Xapian::docid did_, std::string &&data_, std::map< Xapian::valueno, std::string > &&values_) | |
| Constructor used by RemoteDocument subclass. More... | |
Private Member Functions | |
| void | operator= (const ValueStreamDocument &) |
| Don't allow assignment. More... | |
| ValueStreamDocument (const ValueStreamDocument &) | |
| Don't allow copying. More... | |
| ValueStreamDocument (const Xapian::Database &db_, Xapian::doccount n_shards_) | |
| Private constructor. More... | |
Private Attributes | |
| std::map< Xapian::valueno, ValueList * > | valuelists |
| Xapian::Database | db |
| Xapian::doccount | current = 0 |
| Xapian::doccount | n_shards |
| Xapian::Document::Internal * | doc = NULL |
Additional Inherited Members | |
Public Types inherited from Xapian::Document::Internal | |
| enum | remove_posting_result { OK , NO_TERM , NO_POS } |
Public Attributes inherited from Xapian::Internal::intrusive_base | |
| unsigned | _refs |
| Reference count. More... | |
Protected Attributes inherited from Xapian::Document::Internal | |
| std::unique_ptr< std::map< Xapian::valueno, std::string > > | values |
| Document value slots and their contents. More... | |
| Xapian::Internal::intrusive_ptr< const Xapian::Database::Internal > | database |
| Database this document came from. More... | |
| Xapian::docid | did |
| The document ID this document came from in database. More... | |
A document which gets its values from a ValueStreamManager.
Definition at line 35 of file valuestreamdocument.h.
|
private |
Don't allow copying.
|
inlineprivate |
Private constructor.
This is an implementation detail - the public constructor forwards to this constructor so we can use n_shards_ to init our parent class.
Definition at line 57 of file valuestreamdocument.h.
|
inlineexplicit |
Definition at line 66 of file valuestreamdocument.h.
| ValueStreamDocument::~ValueStreamDocument | ( | ) |
Definition at line 40 of file valuestreamdocument.cc.
References clear_valuelists().
|
protectedvirtual |
Implementation of virtual methods.
Reimplemented from Xapian::Document::Internal.
Definition at line 90 of file valuestreamdocument.cc.
|
protectedvirtual |
Implementation of virtual methods.
Reimplemented from Xapian::Document::Internal.
Definition at line 99 of file valuestreamdocument.cc.
|
protectedvirtual |
Implementation of virtual methods.
Reimplemented from Xapian::Document::Internal.
Definition at line 61 of file valuestreamdocument.cc.
References Xapian::ValueIterator::Internal::at_end(), Xapian::ValueIterator::Internal::check(), Xapian::ValueIterator::Internal::get_docid(), and Xapian::ValueIterator::Internal::get_value().
Referenced by get_value().
|
inline |
Definition at line 87 of file valuestreamdocument.h.
References fetch_value().
Referenced by Matcher::get_local_mset().
| void ValueStreamDocument::new_shard | ( | Xapian::doccount | n | ) |
Definition at line 47 of file valuestreamdocument.cc.
References AssertRel, clear_valuelists(), and MultiDatabase::shards.
Referenced by PostListTree::next(), and PostListTree::set_postlists().
|
private |
Don't allow assignment.
|
inline |
Definition at line 81 of file valuestreamdocument.h.
References AssertEq, current, n_shards, set_shard_document(), shard_docid(), and shard_number().
Referenced by Matcher::get_local_mset().
|
inline |
Definition at line 73 of file valuestreamdocument.h.
References Xapian::Document::Internal::did, and doc.
Referenced by set_document(), and DeciderPostList::test_doc().
|
private |
Definition at line 46 of file valuestreamdocument.h.
Referenced by set_document().
|
private |
Definition at line 44 of file valuestreamdocument.h.
|
mutableprivate |
Definition at line 50 of file valuestreamdocument.h.
Referenced by set_shard_document().
|
private |
Definition at line 48 of file valuestreamdocument.h.
Referenced by set_document().
|
mutableprivate |
Definition at line 42 of file valuestreamdocument.h.