message: try to detect body text language
Try to detect the language of the e-mail body and make it searchable.
This commit is contained in:
@ -52,6 +52,7 @@ struct Field {
|
||||
File, /**< Filename */
|
||||
Flags, /**< Message flags */
|
||||
From, /**< Message sender */
|
||||
Language, /**< Body language */
|
||||
Maildir, /**< Maildir path */
|
||||
MailingList, /**< Mailing list */
|
||||
MessageId, /**< Message Id */
|
||||
@ -252,7 +253,6 @@ static constexpr std::array<Field, Field::id_size()>
|
||||
Field::Flag::IncludeInSexp |
|
||||
Field::Flag::IndexableTerm,
|
||||
},
|
||||
|
||||
{
|
||||
Field::Id::Changed,
|
||||
Field::Type::TimeT,
|
||||
@ -316,6 +316,17 @@ static constexpr std::array<Field, Field::id_size()>
|
||||
Field::Flag::IncludeInSexp |
|
||||
Field::Flag::IndexableTerm,
|
||||
},
|
||||
{
|
||||
Field::Id::Language,
|
||||
Field::Type::String,
|
||||
"language", "lang",
|
||||
"ISO 639-1 language code for body",
|
||||
"lang:nl",
|
||||
'a',
|
||||
Field::Flag::BooleanTerm |
|
||||
Field::Flag::Value |
|
||||
Field::Flag::IncludeInSexp
|
||||
},
|
||||
{
|
||||
Field::Id::Maildir,
|
||||
Field::Type::String,
|
||||
|
||||
Reference in New Issue
Block a user