xapian-core
1.4.26
|
Abstract base class for termlists. More...
#include <termlist.h>
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... | |
virtual std::string | get_termname () const =0 |
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 (const std::string &term)=0 |
Skip forward to the specified term. More... | |
virtual bool | at_end () const =0 |
Return true if the current position is past the last term in this list. More... | |
virtual Xapian::termcount | positionlist_count () const =0 |
Return the length of the position list for the current position. More... | |
virtual const std::vector< Xapian::termpos > * | get_vector_termpos () const |
Get pointer to vector<termpos> if that's the internal representation. More... | |
virtual Xapian::PositionIterator | positionlist_begin () const =0 |
Return a PositionIterator 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... | |
Private Member Functions | |
void | operator= (const Internal &) |
Don't allow assignment. More... | |
Internal (const Internal &) | |
Don't allow copying. More... | |
Abstract base class for termlists.
Definition at line 39 of file termlist.h.
|
private |
Don't allow copying.
|
inlineprotected |
Only constructable as a base class for derived classes.
Definition at line 48 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 InMemoryTermList, GlassTermList, NetworkTermList, ChertTermList, OrTermList, and MultiTermList.
Definition at line 34 of file termlist.cc.
References Assert.
Referenced by MultiTermList::accumulate_stats(), and Xapian::Internal::ExpandWeight::collect_stats().
|
pure virtual |
Return true if the current position is past the last term in this list.
Implemented in InMemoryTermList, StringAndFreqTermList, GlassSpellingTermList, GlassSynonymTermList, ChertSynonymTermList, ChertSpellingTermList, GlassTermList, ValueCountTermList, ChertTermList, NetworkTermList, MapTermList, VectorTermList, ChertAllTermsList, GlassAllTermsList, ChertSpellingWordsList, GlassSpellingWordsList, ChertMetadataTermList, GlassMetadataTermList, InMemoryAllTermsList, MultiAllTermsList, OrTermList, AllTermsList, and MultiTermList.
Referenced by MultiTermList::at_end(), and MultiAllTermsList::next().
|
pure virtual |
Return approximate size of this termlist.
Implemented in StringAndFreqTermList, InMemoryTermList, GlassSpellingTermList, ChertSpellingTermList, ValueCountTermList, GlassTermList, NetworkTermList, ChertTermList, VectorTermList, OrTermList, MapTermList, AllTermsList, and MultiTermList.
Referenced by MultiTermList::get_approx_size(), Xapian::CompareTermListSizeAscending::operator()(), and TermListGreaterApproxSize::operator()().
|
pure virtual |
Return the term frequency for the term at the current position.
Implemented in InMemoryTermList, StringAndFreqTermList, GlassSpellingTermList, GlassSynonymTermList, ChertSynonymTermList, ChertSpellingTermList, GlassTermList, NetworkTermList, ChertTermList, ValueCountTermList, FreqAdderOrTermList, VectorTermList, ChertAllTermsList, GlassAllTermsList, ChertSpellingWordsList, GlassSpellingWordsList, ChertMetadataTermList, GlassMetadataTermList, MapTermList, OrTermList, InMemoryAllTermsList, MultiAllTermsList, AllTermsList, and MultiTermList.
Referenced by Xapian::TermIterator::get_termfreq().
|
pure virtual |
Return the termname at the current position.
Implemented in InMemoryTermList, StringAndFreqTermList, GlassSpellingTermList, GlassSynonymTermList, ChertSynonymTermList, ChertSpellingTermList, GlassTermList, NetworkTermList, ChertTermList, ValueCountTermList, VectorTermList, ChertAllTermsList, GlassAllTermsList, ChertSpellingWordsList, GlassSpellingWordsList, ChertMetadataTermList, GlassMetadataTermList, InMemoryAllTermsList, OrTermList, MapTermList, MultiAllTermsList, MultiTermList, and AllTermsList.
Referenced by Xapian::Database::get_spelling_suggestion(), MultiTermList::get_termfreq(), MultiTermList::get_termname(), MultiAllTermsList::next(), CompareTermListsByTerm::operator()(), Xapian::TermIterator::operator*(), and MultiAllTermsList::skip_to().
|
virtual |
Get pointer to vector<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 MapTermList.
Definition at line 42 of file termlist.cc.
Referenced by Inverter::set_positionlist().
|
pure virtual |
Return the wdf for the term at the current position.
Implemented in InMemoryTermList, StringAndFreqTermList, GlassSpellingTermList, ChertSpellingTermList, ValueCountTermList, GlassTermList, NetworkTermList, ChertTermList, VectorTermList, MapTermList, OrTermList, AllTermsList, and MultiTermList.
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 InMemoryTermList, StringAndFreqTermList, GlassSpellingTermList, GlassSynonymTermList, ChertSynonymTermList, ChertSpellingTermList, GlassTermList, ChertTermList, NetworkTermList, ValueCountTermList, VectorTermList, MapTermList, ChertAllTermsList, GlassAllTermsList, ChertSpellingWordsList, GlassSpellingWordsList, ChertMetadataTermList, GlassMetadataTermList, InMemoryAllTermsList, OrTermList, MultiAllTermsList, AllTermsList, and MultiTermList.
Referenced by Xapian::ESet::Internal::expand(), Xapian::Database::get_spelling_suggestion(), MultiTermList::next(), MultiAllTermsList::next(), Xapian::TermIterator::operator++(), and Xapian::TermIterator::TermIterator().
|
private |
Don't allow assignment.
|
pure virtual |
Return a PositionIterator for the current position.
Implemented in InMemoryTermList, StringAndFreqTermList, GlassSpellingTermList, ChertSpellingTermList, GlassTermList, ValueCountTermList, ChertTermList, NetworkTermList, VectorTermList, AllTermsList, MapTermList, OrTermList, and MultiTermList.
Referenced by MultiTermList::positionlist_begin(), and Xapian::TermIterator::positionlist_begin().
|
pure virtual |
Return the length of the position list for the current position.
Implemented in InMemoryTermList, StringAndFreqTermList, GlassSpellingTermList, ChertSpellingTermList, GlassTermList, ValueCountTermList, ChertTermList, NetworkTermList, VectorTermList, MapTermList, AllTermsList, OrTermList, and MultiTermList.
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 tname (or at_end() if no terms after tname exist).
Implemented in InMemoryTermList, StringAndFreqTermList, GlassSpellingTermList, GlassSynonymTermList, ChertSynonymTermList, ChertSpellingTermList, GlassTermList, ChertTermList, ValueCountTermList, NetworkTermList, MapTermList, VectorTermList, ChertAllTermsList, GlassAllTermsList, ChertSpellingWordsList, GlassSpellingWordsList, ChertMetadataTermList, GlassMetadataTermList, MultiAllTermsList, OrTermList, AllTermsList, InMemoryAllTermsList, and MultiTermList.
Referenced by Xapian::Weight::Internal::accumulate_stats(), MultiTermList::skip_to(), MultiAllTermsList::skip_to(), and Xapian::TermIterator::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 114 of file termlist.h.
Referenced by ChertTermList::accumulate_stats(), NetworkTermList::accumulate_stats(), GlassTermList::accumulate_stats(), and InMemoryTermList::accumulate_stats().