21 #ifndef XAPIAN_INCLUDED_CHERT_SYNONYM_H 22 #define XAPIAN_INCLUDED_CHERT_SYNONYM_H 52 Z_DEFAULT_STRATEGY) { }
60 last_synonyms.clear();
67 void add_synonym(
const std::string & term,
const std::string & synonym);
73 void remove_synonym(
const std::string & term,
const std::string & synonym);
134 const string & prefix_)
135 : database(database_), cursor(cursor_), prefix(prefix_)
140 if (prefix.empty()) {
156 string get_termname()
const;
165 TermList * skip_to(
const string &tname);
171 #endif // XAPIAN_INCLUDED_CHERT_SYNONYM_H bool is_modified() const
Override methods of ChertTable.
ChertCursor * cursor
A cursor which runs through the synonym table reading termnames from the keys.
ChertSynonymTermList(Xapian::Internal::intrusive_ptr< const Xapian::Database::Internal > database_, ChertCursor *cursor_, const string &prefix_)
A cursor pointing to a position in a Btree table, for reading several entries in order, or finding approximate matches.
void clear_synonyms(const std::string &term)
Remove all synonyms for term.
std::string last_term
The last term which was updated.
std::set< std::string > last_synonyms
The synonyms for the last term which was updated.
Abstract base class for termlists.
string prefix
The prefix to restrict the terms to.
TermList * open_termlist(const std::string &term)
Open synonym termlist for a term.
void add_synonym(const std::string &term, const std::string &synonym)
Add a synonym for term.
void cancel()
Cancel any outstanding changes.
bool is_modified() const
Determine whether the object contains uncommitted modifications.
bool next(Cursor *C_, int j) const
void flush_db()
Override methods of ChertTable.
Abstract base class for iterating all terms in a database.
ChertTable & operator=(const ChertTable &)
Assignment not allowed.
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
Subclass of ChertTable for deriving lazy tables from.
void find_entry_lt(const string &key)
Position the cursor on the highest entry with key < key.
ChertSynonymTable(const std::string &dbdir, bool readonly)
Create a new ChertSynonymTable object.
Abstract base class for termlists.
Xapian::Internal::intrusive_ptr< const Xapian::Database::Internal > database
Keep a reference to our database to stop it being deleted.
void flush_db()
Flush any outstanding changes to the DB file of the table.
Abstract base class for iterating all terms in a database.
void cancel()
Override methods of ChertTable.
bool find_entry(const string &key)
Position the cursor on the highest entry with key <= key.
void remove_synonym(const std::string &term, const std::string &synonym)
Remove a synonym for term.