|
xapian-core
2.0.0
|
Abstract base class for termlists. More...
#include <termlist.h>
Inheritance diagram for Xapian::TermIterator::Internal:
Collaboration diagram for Xapian::TermIterator::Internal:Public Member Functions | |
| 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... | |
| virtual Xapian::termcount | get_approx_size () const =0 |
| Return approximate size of this termlist. More... | |
| virtual void | accumulate_stats (Xapian::Internal::ExpandStats &stats) const |
| Collate weighting information for the current term. More... | |
| const std::string & | get_termname () const |
| Return the termname at the current position. More... | |
| virtual Xapian::termcount | get_wdf () const =0 |
| Return the wdf for the term at the current position. More... | |
| virtual Xapian::doccount | get_termfreq () const =0 |
| Return the term frequency for the term at the current position. More... | |
| virtual Internal * | next ()=0 |
| Advance the current position to the next term in the termlist. More... | |
| virtual Internal * | skip_to (std::string_view term)=0 |
| Skip forward to the specified term. More... | |
| virtual Xapian::termcount | positionlist_count () const =0 |
| Return the length of the position list for the current position. More... | |
| virtual const Xapian::VecCOW< Xapian::termpos > * | get_vec_termpos () const |
| Get pointer to VecCOW<termpos> if that's the internal representation. More... | |
| virtual PositionList * | positionlist_begin () const =0 |
| Return PositionList for the current position. More... | |
Public Member Functions inherited from Xapian::Internal::intrusive_base | |
| intrusive_base () | |
| Construct with no references. More... | |
Public Attributes | |
| size_t | shard_index = 0 |
| Which shard of a multidatabase this is from. More... | |
Public Attributes inherited from Xapian::Internal::intrusive_base | |
| unsigned | _refs |
| Reference count. More... | |
Protected Member Functions | |
| Internal () | |
| Only constructable as a base class for derived classes. More... | |
Protected Attributes | |
| std::string | current_term |
| The current term. More... | |
Private Member Functions | |
| void | operator= (const Internal &)=delete |
| Don't allow assignment. More... | |
| Internal (const Internal &)=delete | |
| Don't allow copying. More... | |
Abstract base class for termlists.
Definition at line 42 of file termlist.h.
|
privatedelete |
Don't allow copying.
|
inlineprotected |
Only constructable as a base class for derived classes.
Definition at line 51 of file termlist.h.
|
virtual |
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.
Definition at line 31 of file termlist.cc.
|
virtual |
Collate weighting information for the current term.
Reimplemented in OrTermList, RemoteTermList, InMemoryTermList, HoneyTermList, and GlassTermList.
Definition at line 34 of file termlist.cc.
References Assert.
Referenced by Xapian::Internal::ExpandWeight::collect_stats().
|
pure virtual |
Return approximate size of this termlist.
Implemented in AllTermsList, OrTermList, RemoteTermList, RemoteKeyList, RemoteAllTermsList, MultiTermList, MultiAllTermsList, InMemoryTermList, InMemoryAllTermsList, HoneyTermList, HoneySynonymTermList, HoneySpellingWordsList, HoneySpellingTermList, HoneyMetadataTermList, HoneyAllTermsList, GlassTermList, GlassSynonymTermList, GlassSpellingWordsList, GlassSpellingTermList, GlassMetadataTermList, GlassAllTermsList, VectorTermList, StringAndFreqTermList, ValueCountTermList, and DocumentTermList.
Referenced by MultiTermList::get_approx_size(), RemoteServer::msg_termlist(), TermListGreaterApproxSize::operator()(), and CompareTermListSizeAscending::operator()().
|
pure virtual |
Return the term frequency for the term at the current position.
Implemented in AllTermsList, FreqAdderOrTermList, OrTermList, RemoteTermList, RemoteKeyList, RemoteAllTermsList, MultiTermList, MultiAllTermsList, InMemoryTermList, InMemoryAllTermsList, HoneyTermList, HoneySynonymTermList, HoneySpellingWordsList, HoneySpellingTermList, HoneyMetadataTermList, HoneyAllTermsList, GlassTermList, GlassSynonymTermList, GlassSpellingWordsList, GlassSpellingTermList, GlassMetadataTermList, GlassAllTermsList, VectorTermList, StringAndFreqTermList, ValueCountTermList, and DocumentTermList.
Referenced by MultiAllTermsList::get_termfreq(), and Xapian::TermIterator::get_termfreq().
|
inline |
Return the termname at the current position.
Definition at line 69 of file termlist.h.
References current_term.
Referenced by GlassWritableDatabase::delete_document(), MultiAllTermsList::get_termfreq(), MultiTermList::get_termfreq(), MultiAllTermsList::next(), MultiTermList::next(), CompareTermListsByTerm::operator()(), Xapian::TermIterator::operator*(), Xapian::reconstruct_open_poslists(), GlassWritableDatabase::replace_document(), MultiAllTermsList::skip_to(), and MultiTermList::skip_to().
|
virtual |
Get pointer to VecCOW<termpos> if that's the internal representation.
This avoids unnecessary copying of positions in the common cases - the case it doesn't help with is adding a document back with unmodified positions AND a different docid, which is an unusual thing to do.
Reimplemented in DocumentTermList.
Definition at line 42 of file termlist.cc.
Referenced by HoneyInverter::set_positionlist().
|
pure virtual |
Return the wdf for the term at the current position.
Implemented in OrTermList, RemoteTermList, MultiTermList, InMemoryTermList, HoneyTermList, HoneySpellingTermList, GlassTermList, GlassSpellingTermList, AllTermsList, VectorTermList, StringAndFreqTermList, ValueCountTermList, and DocumentTermList.
Referenced by MultiTermList::get_wdf(), and Xapian::TermIterator::get_wdf().
|
pure virtual |
Advance the current position to the next term in the termlist.
The list starts before the first term in the list, so next(), skip_to() or check() must be called before any methods which need the context of the current position.
Implemented in AllTermsList, OrTermList, RemoteTermList, RemoteKeyList, RemoteAllTermsList, MultiTermList, MultiAllTermsList, InMemoryTermList, InMemoryAllTermsList, HoneyTermList, HoneySynonymTermList, HoneySpellingWordsList, HoneySpellingTermList, HoneyMetadataTermList, HoneyAllTermsList, GlassTermList, GlassSynonymTermList, GlassSpellingWordsList, GlassSpellingTermList, GlassMetadataTermList, GlassAllTermsList, VectorTermList, StringAndFreqTermList, ValueCountTermList, and DocumentTermList.
Referenced by Xapian::ESet::Internal::expand(), Xapian::Internal::Context::expand_edit_distance(), Xapian::Internal::Context::expand_wildcard(), Xapian::Database::get_spelling_suggestion(), MultiAllTermsList::get_termfreq(), MultiAllTermsList::next(), MultiTermList::next(), OrTermList::next(), Xapian::TermIterator::operator++(), Xapian::reconstruct_open_poslists(), and Xapian::TermIterator::TermIterator().
|
privatedelete |
Don't allow assignment.
|
pure virtual |
Return PositionList for the current position.
Implemented in OrTermList, RemoteTermList, MultiTermList, InMemoryTermList, HoneyTermList, HoneySpellingTermList, GlassTermList, GlassSpellingTermList, AllTermsList, VectorTermList, StringAndFreqTermList, ValueCountTermList, and DocumentTermList.
Referenced by MultiTermList::positionlist_begin(), Xapian::TermIterator::positionlist_begin(), and Xapian::reconstruct_open_poslists().
|
pure virtual |
Return the length of the position list for the current position.
Implemented in OrTermList, RemoteTermList, MultiTermList, InMemoryTermList, HoneyTermList, HoneySpellingTermList, GlassTermList, GlassSpellingTermList, AllTermsList, VectorTermList, StringAndFreqTermList, ValueCountTermList, and DocumentTermList.
Referenced by MultiTermList::positionlist_count(), and Xapian::TermIterator::positionlist_count().
|
pure virtual |
Skip forward to the specified term.
If the specified term isn't in the list, position ourselves on the first term after term.
Implemented in StringAndFreqTermList, ValueCountTermList, VectorTermList, InMemoryAllTermsList, GlassSynonymTermList, GlassSpellingWordsList, GlassAllTermsList, AllTermsList, OrTermList, RemoteTermList, RemoteKeyList, RemoteAllTermsList, MultiTermList, MultiAllTermsList, InMemoryTermList, HoneyTermList, HoneySynonymTermList, HoneySpellingWordsList, HoneySpellingTermList, HoneyAllTermsList, GlassTermList, GlassSpellingTermList, DocumentTermList, HoneyMetadataTermList, and GlassMetadataTermList.
Referenced by Xapian::Weight::Internal::accumulate_stats(), Xapian::Internal::Context::expand_edit_distance(), Xapian::Internal::Context::expand_wildcard(), MultiTermList::skip_to(), OrTermList::skip_to(), and Xapian::TermIterator::skip_to().
|
protected |
The current term.
Definition at line 54 of file termlist.h.
Referenced by GlassTermList::get_termfreq(), HoneyTermList::get_termfreq(), MultiAllTermsList::get_termfreq(), get_termname(), HoneySpellingTermList::HoneySpellingTermList(), GlassMetadataTermList::next(), GlassTermList::next(), HoneyMetadataTermList::next(), HoneyTermList::next(), InMemoryTermList::next(), MultiAllTermsList::next(), MultiTermList::next(), GlassTermList::positionlist_begin(), HoneyTermList::positionlist_begin(), GlassTermList::positionlist_count(), HoneyTermList::positionlist_count(), RemoteAllTermsList::RemoteAllTermsList(), RemoteKeyList::RemoteKeyList(), GlassMetadataTermList::skip_to(), HoneyMetadataTermList::skip_to(), GlassTermList::skip_to(), HoneyTermList::skip_to(), InMemoryTermList::skip_to(), MultiAllTermsList::skip_to(), and MultiTermList::skip_to().
| size_t Xapian::TermIterator::Internal::shard_index = 0 |
Which shard of a multidatabase this is from.
Used by Enquire::get_eset().
Definition at line 126 of file termlist.h.
Referenced by GlassTermList::accumulate_stats(), HoneyTermList::accumulate_stats(), InMemoryTermList::accumulate_stats(), and MultiDatabase::open_term_list_direct().