21 #ifndef XAPIAN_INCLUDED_TERMGENERATOR_H
22 #define XAPIAN_INCLUDED_TERMGENERATOR_H
24 #if !defined XAPIAN_IN_XAPIAN_H && !defined XAPIAN_LIB_BUILD
25 # error Never use <xapian/termgenerator.h> directly; include <xapian.h> instead.
34 #include <string_view>
41 class WritableDatabase;
135 FLAG_CJK_NGRAM = FLAG_NGRAMS,
149 FLAG_WORD_BREAKS = 4096
154 STEM_NONE, STEM_SOME,
STEM_ALL, STEM_ALL_Z, STEM_SOME_FULL_POS
158 typedef enum { STOP_NONE,
STOP_ALL, STOP_STEMMED } stop_strategy;
172 flags set_flags(flags toggle, flags mask = flags(0));
193 void set_stemming_strategy(stem_strategy strategy);
214 void set_stopper_strategy(stop_strategy strategy);
231 void set_max_word_length(
unsigned max_word_length);
241 std::string_view prefix = {});
251 std::string_view prefix = {}) {
267 std::string_view prefix = {});
281 std::string_view prefix = {}) {
282 index_text_without_positions(
Utf8Iterator(text), wdf_inc, prefix);
316 std::string get_description()
const;
Class representing a document.
Class representing a stemming algorithm.
Abstract base class for stop-word decision functor.
Parses a piece of text and generate terms.
TermGenerator & operator=(const TermGenerator &o)
Assignment.
TermGenerator(TermGenerator &&o)
Move constructor.
void index_text_without_positions(std::string_view text, Xapian::termcount wdf_inc=1, std::string_view prefix={})
Index some text without positional information.
void index_text(std::string_view text, Xapian::termcount wdf_inc=1, std::string_view prefix={})
Index some text.
int flags
For backward compatibility with Xapian 1.2.
TermGenerator & operator=(TermGenerator &&o)
Move assignment operator.
TermGenerator(const TermGenerator &o)
Copy constructor.
An iterator which returns Unicode character values from a UTF-8 encoded string.
This class provides read/write access to a database.
The Xapian namespace contains public interfaces for the Xapian library.
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
unsigned XAPIAN_TERMPOS_BASE_TYPE termpos
A term position within a document or query.
static Xapian::Stem stemmer
Unicode and UTF-8 related classes and functions.
Define XAPIAN_VISIBILITY_* macros.
#define XAPIAN_VISIBILITY_DEFAULT