21 #ifndef XAPIAN_INCLUDED_VECTORTERMLIST_H
22 #define XAPIAN_INCLUDED_VECTORTERMLIST_H
53 size_t total_size = 0;
54 for (I i = begin; i != end; ++i) {
56 const std::string & s = *i;
57 total_size += s.size() + 1;
58 if (s.size() >= 128) {
64 data.reserve(total_size);
67 for (I i = begin; i != end; ++i) {
This class stores a list of terms.
TermList * skip_to(std::string_view)
Skip forward to the specified term.
VectorTermList(I begin, I end)
Xapian::termcount get_approx_size() const
Return approximate size of this termlist.
Xapian::doccount get_termfreq() const
Return the term frequency for the term at the current position.
Xapian::termcount num_terms
The number of terms in the list.
const char * p
Pointer to the next term's data, or NULL if we are at end.
std::string data
The encoded terms.
Xapian::termcount get_wdf() const
Return the wdf for the term at the current position.
PositionList * positionlist_begin() const
Return PositionList for the current position.
Xapian::termcount positionlist_count() const
Return the length of the position list for the current position.
TermList * next()
Advance the current position to the next term in the termlist.
Abstract base class for iterating term positions in a document.
Abstract base class for termlists.
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
Pack types into strings and unpack them again.
void pack_string(std::string &s, std::string_view value)
Append an encoded std::string to a string.
Abstract base class for termlists.