mirror of https://github.com/djcb/mu.git
message/fields: explicit mark contact fields as IndexableTerm
They were so *implicitly*, but the query parser needs the info so contact fields can use phrase-searces, too.
This commit is contained in:
parent
699ce5369b
commit
49b97e1b6b
|
@ -94,14 +94,13 @@ validate_field_flags()
|
|||
/* - A field has at most one of Indexable, HasTerms, IsXapianBoolean and
|
||||
IsContact. */
|
||||
size_t flagnum{};
|
||||
|
||||
if (field.is_indexable_term())
|
||||
++flagnum;
|
||||
if (field.is_boolean_term())
|
||||
++flagnum;
|
||||
if (field.is_normal_term())
|
||||
++flagnum;
|
||||
if (field.is_contact())
|
||||
++flagnum;
|
||||
|
||||
if (flagnum > 1) {
|
||||
//g_warning("invalid field %*s", STR_V(field.name));
|
||||
|
|
|
@ -225,7 +225,9 @@ static constexpr std::array<Field, Field::id_size()>
|
|||
'h',
|
||||
Field::Flag::Contact |
|
||||
Field::Flag::Value |
|
||||
Field::Flag::IncludeInSexp
|
||||
Field::Flag::IncludeInSexp |
|
||||
Field::Flag::IndexableTerm,
|
||||
|
||||
},
|
||||
{
|
||||
Field::Id::BodyText,
|
||||
|
@ -245,7 +247,8 @@ static constexpr std::array<Field, Field::id_size()>
|
|||
'c',
|
||||
Field::Flag::Contact |
|
||||
Field::Flag::Value |
|
||||
Field::Flag::IncludeInSexp
|
||||
Field::Flag::IncludeInSexp |
|
||||
Field::Flag::IndexableTerm,
|
||||
},
|
||||
|
||||
{
|
||||
|
@ -308,7 +311,8 @@ static constexpr std::array<Field, Field::id_size()>
|
|||
'f',
|
||||
Field::Flag::Contact |
|
||||
Field::Flag::Value |
|
||||
Field::Flag::IncludeInSexp
|
||||
Field::Flag::IncludeInSexp |
|
||||
Field::Flag::IndexableTerm,
|
||||
},
|
||||
{
|
||||
Field::Id::Maildir,
|
||||
|
@ -436,7 +440,8 @@ static constexpr std::array<Field, Field::id_size()>
|
|||
't',
|
||||
Field::Flag::Contact |
|
||||
Field::Flag::Value |
|
||||
Field::Flag::IncludeInSexp
|
||||
Field::Flag::IncludeInSexp |
|
||||
Field::Flag::IndexableTerm,
|
||||
},
|
||||
|
||||
/* internal */
|
||||
|
|
Loading…
Reference in New Issue