21 #ifndef XAPIAN_INCLUDED_VECTORTERMLIST_H 22 #define XAPIAN_INCLUDED_VECTORTERMLIST_H 56 size_t total_size = 0;
57 for (I i = begin; i != end; ++i) {
59 const std::string & s = *i;
60 total_size += s.size() + 1;
61 if (s.size() >= 255) {
67 data.reserve(total_size);
70 for (I i = begin; i != end; ++i) {
71 const std::string & s = *i;
98 #endif // XAPIAN_INCLUDED_VECTORTERMLIST_H TermList * next()
Advance the current position to the next term in the termlist.
length encoded as a string
Abstract base class for termlists.
Xapian::termcount get_approx_size() const
Return approximate size of this termlist.
std::string encode_length(T len)
Encode a length as a variable-length string.
Xapian::doccount get_termfreq() const
Return the term frequency for the term at the current position.
VectorTermList(I begin, I end)
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
Xapian::termcount get_wdf() const
Return the wdf for the term at the current position.
Xapian::termcount num_terms
The number of terms in the list.
Xapian::PositionIterator positionlist_begin() const
Return a PositionIterator for the current position.
Class for iterating over term positions.
bool at_end() const
Return true if the current position is past the last term in this list.
This class stores a list of terms.
Xapian::termcount positionlist_count() const
Return the length of the position list for the current position.
std::string data
The encoded terms.
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
Abstract base class for termlists.
const char * p
Pointer to the next term's data, or NULL if we are at end.
std::string current_term
The current term.
TermList * skip_to(const std::string &)
Skip forward to the specified term.
std::string get_termname() const
Return the termname at the current position.