21 #ifndef XAPIAN_INCLUDED_HONEY_SYNONYM_H
22 #define XAPIAN_INCLUDED_HONEY_SYNONYM_H
34 #include <string_view>
145 std::string_view prefix_)
Abstract base class for iterating all terms in a database.
Abstract base class for iterating all terms in a database.
Database using honey backend.
std::set< std::string, std::less<> > last_synonyms
The synonyms for the last term which was updated.
bool is_modified() const
Override methods of HoneyTable.
void clear_synonyms(std::string_view term)
Remove all synonyms for term.
void flush_db()
Override methods of HoneyTable.
HoneySynonymTable(int fd, off_t offset_, bool readonly)
void add_synonym(std::string_view term, std::string_view synonym)
Add a synonym for term.
void cancel(const Honey::RootInfo &root_info, honey_revision_number_t rev)
Override methods of HoneyTable.
void remove_synonym(std::string_view term, std::string_view synonym)
Remove a synonym for term.
std::string last_term
The last term which was updated.
TermList * open_termlist(std::string_view term) const
Open synonym termlist for a term.
HoneySynonymTable(const std::string &dbdir, bool readonly)
Create a new HoneySynonymTable object.
TermList * skip_to(std::string_view term)
Advance to the first term which is >= term.
HoneySynonymTermList(const HoneyDatabase *database_, HoneyCursor *cursor_, std::string_view prefix_)
HoneySynonymTermList(const HoneySynonymTermList &)
Copying is not allowed.
Xapian::doccount get_termfreq() const
Return the term frequency for the term at the current position.
void operator=(const HoneySynonymTermList &)
Assignment is not allowed.
HoneyCursor * cursor
A cursor which runs through the synonym table reading termnames from the keys.
~HoneySynonymTermList()
Destructor.
Xapian::termcount get_approx_size() const
Return approximate size of this termlist.
TermList * next()
Advance to the next term in the list.
std::string prefix
The prefix to restrict the terms to.
Xapian::Internal::intrusive_ptr< const HoneyDatabase > database
Keep a reference to our database to stop it being deleted.
void cancel(const Honey::RootInfo &, honey_revision_number_t)
Abstract base class for termlists.
uint4 honey_revision_number_t
The revision number of a honey database.
Subclass of HoneyTable for deriving lazy tables from.
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
XAPIAN_REVISION_TYPE rev
Revision number of a database.
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
Abstract base class for termlists.