xapian-core
1.4.27
|
#include <inmemory_database.h>
Public Member Functions | |
Xapian::termcount | get_approx_size () const |
Return approximate size of this termlist. More... | |
void | accumulate_stats (Xapian::Internal::ExpandStats &stats) const |
Collate weighting information for the current term. More... | |
string | get_termname () const |
Return the termname at the current position. More... | |
Xapian::termcount | get_wdf () const |
Return the wdf for the term at the current position. More... | |
Xapian::doccount | get_termfreq () const |
Return the term frequency for the term at the current position. More... | |
TermList * | next () |
Advance the current position to the next term in the termlist. More... | |
TermList * | skip_to (const std::string &term) |
Skip forward to the specified term. More... | |
bool | at_end () const |
Return true if the current position is past the last term in this list. More... | |
Xapian::termcount | positionlist_count () const |
Return the length of the position list for the current position. More... | |
Xapian::PositionIterator | positionlist_begin () const |
Return a PositionIterator for the current position. More... | |
Public Member Functions inherited from Xapian::TermIterator::Internal | |
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 const std::vector< Xapian::termpos > * | get_vector_termpos () const |
Get pointer to vector<termpos> if that's the internal representation. More... | |
Public Member Functions inherited from Xapian::Internal::intrusive_base | |
intrusive_base () | |
Construct with no references. More... | |
Private Member Functions | |
InMemoryTermList (Xapian::Internal::intrusive_ptr< const InMemoryDatabase > db, Xapian::docid did, const InMemoryDoc &doc, Xapian::termcount len) | |
Private Attributes | |
vector< InMemoryTermEntry >::const_iterator | pos |
vector< InMemoryTermEntry >::const_iterator | end |
Xapian::termcount | terms |
bool | started |
Xapian::Internal::intrusive_ptr< const InMemoryDatabase > | db |
Xapian::docid | did |
Xapian::termcount | document_length |
Friends | |
class | InMemoryDatabase |
Additional Inherited Members | |
Public Attributes inherited from Xapian::TermIterator::Internal | |
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 inherited from Xapian::TermIterator::Internal | |
Internal () | |
Only constructable as a base class for derived classes. More... | |
Definition at line 216 of file inmemory_database.h.
|
private |
Definition at line 239 of file inmemory_database.cc.
|
virtual |
Collate weighting information for the current term.
Reimplemented from Xapian::TermIterator::Internal.
Definition at line 279 of file inmemory_database.cc.
References Xapian::Internal::ExpandStats::accumulate(), Assert, at_end(), db, document_length, InMemoryDatabase::get_doccount(), get_termfreq(), get_wdf(), InMemoryDatabase::is_closed(), Xapian::TermIterator::Internal::shard_index, started, and InMemoryDatabase::throw_database_closed().
|
virtual |
Return true if the current position is past the last term in this list.
Implements Xapian::TermIterator::Internal.
Definition at line 327 of file inmemory_database.cc.
References Assert, db, end, InMemoryDatabase::is_closed(), pos, started, and InMemoryDatabase::throw_database_closed().
Referenced by accumulate_stats(), get_termfreq(), get_termname(), get_wdf(), and next().
|
virtual |
Return approximate size of this termlist.
Implements Xapian::TermIterator::Internal.
Definition at line 272 of file inmemory_database.cc.
References db, InMemoryDatabase::is_closed(), terms, and InMemoryDatabase::throw_database_closed().
|
virtual |
Return the term frequency for the term at the current position.
Implements Xapian::TermIterator::Internal.
Definition at line 260 of file inmemory_database.cc.
References Assert, at_end(), db, InMemoryDatabase::get_freqs(), InMemoryDatabase::is_closed(), started, and InMemoryDatabase::throw_database_closed().
Referenced by accumulate_stats().
|
virtual |
Return the termname at the current position.
Implements Xapian::TermIterator::Internal.
Definition at line 291 of file inmemory_database.cc.
References Assert, at_end(), db, InMemoryDatabase::is_closed(), started, and InMemoryDatabase::throw_database_closed().
|
virtual |
Return the wdf for the term at the current position.
Implements Xapian::TermIterator::Internal.
Definition at line 251 of file inmemory_database.cc.
References Assert, at_end(), db, InMemoryDatabase::is_closed(), started, and InMemoryDatabase::throw_database_closed().
Referenced by accumulate_stats().
|
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.
Implements Xapian::TermIterator::Internal.
Definition at line 300 of file inmemory_database.cc.
References Assert, at_end(), db, InMemoryDatabase::is_closed(), pos, started, and InMemoryDatabase::throw_database_closed().
|
virtual |
Return a PositionIterator for the current position.
Implements Xapian::TermIterator::Internal.
Definition at line 342 of file inmemory_database.cc.
References db, did, InMemoryDatabase::is_closed(), InMemoryDatabase::open_position_list(), and InMemoryDatabase::throw_database_closed().
|
virtual |
Return the length of the position list for the current position.
Implements Xapian::TermIterator::Internal.
Definition at line 335 of file inmemory_database.cc.
References db, did, InMemoryDatabase::is_closed(), InMemoryDatabase::positionlist_count(), and InMemoryDatabase::throw_database_closed().
|
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).
Implements Xapian::TermIterator::Internal.
Definition at line 313 of file inmemory_database.cc.
References db, end, InMemoryDatabase::is_closed(), pos, rare, started, and InMemoryDatabase::throw_database_closed().
|
friend |
Definition at line 217 of file inmemory_database.h.
|
private |
Definition at line 225 of file inmemory_database.h.
Referenced by accumulate_stats(), at_end(), get_approx_size(), get_termfreq(), get_termname(), get_wdf(), next(), positionlist_begin(), positionlist_count(), and skip_to().
|
private |
Definition at line 226 of file inmemory_database.h.
Referenced by positionlist_begin(), and positionlist_count().
|
private |
Definition at line 227 of file inmemory_database.h.
Referenced by accumulate_stats().
|
private |
Definition at line 221 of file inmemory_database.h.
|
private |
Definition at line 220 of file inmemory_database.h.
Referenced by at_end(), InMemoryTermList(), next(), and skip_to().
|
private |
Definition at line 223 of file inmemory_database.h.
Referenced by accumulate_stats(), at_end(), get_termfreq(), get_termname(), get_wdf(), next(), and skip_to().
|
private |
Definition at line 222 of file inmemory_database.h.
Referenced by get_approx_size(), and InMemoryTermList().