lib: rename support-ngrams => ngrams-enabled

For consistency.
This commit is contained in:
Dirk-Jan C. Binnema
2026-07-22 17:34:13 +03:00
committed by Seth Ladygo
parent a347d3ada0
commit d24347bad6
7 changed files with 11 additions and 11 deletions

View File

@ -79,7 +79,7 @@ make_term_generator(Xapian::Document& doc, Document::Options opts)
{
Xapian::TermGenerator termgen;
if (any_of(opts & Document::Options::SupportNgrams))
if (any_of(opts & Document::Options::NgramsEnabled))
termgen.set_flags(Xapian::TermGenerator::FLAG_NGRAMS);
termgen.set_document(doc);

View File

@ -43,7 +43,7 @@ class Document {
public:
enum struct Options {
None = 0,
SupportNgrams = 1 << 0, /**< Support ngrams, as used in
NgramsEnabled = 1 << 0, /**< Support ngrams, as used in
* CJK and other languages. */
};

View File

@ -78,8 +78,8 @@ struct Message::Private {
private:
Document::Options doc_opts(Message::Options mopts) {
return any_of(opts & Message::Options::SupportNgrams) ?
Document::Options::SupportNgrams :
return any_of(opts & Message::Options::NgramsEnabled) ?
Document::Options::NgramsEnabled :
Document::Options::None;
}
};

View File

@ -52,7 +52,7 @@ public:
* access) */
AllowRelativePath = 1 << 2, /**< Allow relative paths for filename
* in make_from_path */
SupportNgrams = 1 << 3, /**< Support ngrams, as used in
NgramsEnabled = 1 << 3, /**< Support ngrams, as used in
* CJK and other languages. */
};