Re: [PATCH 9/9] add has: query prefix to search for specific properties
Jameson Graef Rollins writes: > Super minor annoying comment, but I wonder if there's a missing colon in > the above addition: > >> + **tag:**, **id:**, **thread:**, **folder:**, **path:**, **has:** annoying, but correct ;). d ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH 9/9] add has: query prefix to search for specific properties
On Sat, Aug 06 2016, David Bremner wrote: > @@ -217,7 +224,7 @@ exact matches like "tag:inbox" or **probabilistic**, > supporting a more flexible > > > Boolean > - **tag:**, **id:**, **thread:**, **folder:**, **path:** > + **tag:**, **id:**, **thread:**, **folder:**, **path:**, **has** > Probabilistic > **from:**, **to:**, **subject:**, **attachment:**, **mimetype:** Super minor annoying comment, but I wonder if there's a missing colon in the above addition: > + **tag:**, **id:**, **thread:**, **folder:**, **path:**, **has:** signature.asc Description: PGP signature ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH 9/9] add has: query prefix to search for specific properties
Jani Nikula writes: >> I don't really understand the comment on the next line (since it seems >> that no : is added to XPROPERTY by Xapian), but I guess we should >> probably be consistent. Maybe Jani can explain the comment? > > My recollection is vague, but it has to do with user-defined prefixes > (XSOMETHING) and terms beginning with uppercase letters. I think it > would possibly be useful (mandatory?) to append ":" at the end of > XPROPERTY, if it's possible we'll have properties beginning with > uppercase letters. > > Quoting https://xapian.org/docs/omega/termprefixes.html > > """ > X starts a multi-capital letter user-defined prefix. If you want a > prefix for something without a standard prefix, you create your own > starting with an X (e.g. XSHOESIZE). The prefix ends with the first > non-capital. If the term you're prefixing starts with a capital, add a > ":" between prefix and term to resolve ambiguity about where the prefix > ends and the term begins. > """ Well, it seems harmless (modulo the 1 extra byte) to add it. I was wondering if the comment (and requirement) dated back to when we added XFOLDER: terms with some Xapian term generator, but I think I wasn't able to verify that poking around in the history. d ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH 9/9] add has: query prefix to search for specific properties
On Sat, 06 Aug 2016, David Bremner wrote: > David Bremner writes: > >> >> +The **has:** prefix searches for messages with a particular >> += property pair. Properties are used internally by notmuch >> +(and extensions) to add metadata to messages. A given key can be >> +present on a given message with several different values. >> + > > I probably should have added to the commit message that this > documentation is intentionally minimal, because it's not intended for > people creating properties; that should go in API documentation, I think. > > >> +{ "has","XPROPERTY" }, >> /* >> * Without the ":", since this is a multi-letter prefix, Xapian >> * will add a colon itself if the first letter of the path > > I don't really understand the comment on the next line (since it seems > that no : is added to XPROPERTY by Xapian), but I guess we should > probably be consistent. Maybe Jani can explain the comment? My recollection is vague, but it has to do with user-defined prefixes (XSOMETHING) and terms beginning with uppercase letters. I think it would possibly be useful (mandatory?) to append ":" at the end of XPROPERTY, if it's possible we'll have properties beginning with uppercase letters. Quoting https://xapian.org/docs/omega/termprefixes.html """ X starts a multi-capital letter user-defined prefix. If you want a prefix for something without a standard prefix, you create your own starting with an X (e.g. XSHOESIZE). The prefix ends with the first non-capital. If the term you're prefixing starts with a capital, add a ":" between prefix and term to resolve ambiguity about where the prefix ends and the term begins. """ BR, Jani. ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH 9/9] add has: query prefix to search for specific properties
David Bremner writes: > > +The **has:** prefix searches for messages with a particular > += property pair. Properties are used internally by notmuch > +(and extensions) to add metadata to messages. A given key can be > +present on a given message with several different values. > + I probably should have added to the commit message that this documentation is intentionally minimal, because it's not intended for people creating properties; that should go in API documentation, I think. > +{ "has", "XPROPERTY" }, > /* > * Without the ":", since this is a multi-letter prefix, Xapian > * will add a colon itself if the first letter of the path I don't really understand the comment on the next line (since it seems that no : is added to XPROPERTY by Xapian), but I guess we should probably be consistent. Maybe Jani can explain the comment? d ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch