You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both queries return 29 zettels, whereas there are 15 zettels with the tag "National League". (In all examples here index.db is populated by the zettels in zg-tutorial/zettels/baseball.) zfind seems to be handling the space character as the operator OR.
The expected outcome is achieved in this case by joining the search terms with an underscore:
These two queries return 9 and 6 zettels, respectively.
The first query (for the string "AL Central") returns the five zettels with the tag "AL Central" plus four zettels in which the word-token "AL" does not appear in the tags. (The four false returns have the tags "NL Central" and "National League".) In this case --query-string 'tags:"AL Central"' is not equivalent to --query-string 'tags:"AL" | tags:"Central"'. Something else is going on. What?
The second query (for "AL_Central") returns the five correct zettels plus los-angeles-angels.yaml. Again, I do not understand why.
The text was updated successfully, but these errors were encountered:
Just to clarify: queries for single words have the expected results and can be joined with logical operators (& | !) as documented. The unexpected behaviors occur only when the query string contains two or more words, delimited by the space-character or underscore (e.g. "National League", "NL_Central").
Prior to zettelgeist v.1.1.5, queries with
zfind
worked as described in the baseball tutorial. The grammar of query strings has changed, such thatzfind --database index.db --query-string 'tags:"National League"' --count
is equivalent to
zfind --database index.db --query-string 'tags:"National" | tags:"League"' --count
Both queries return 29 zettels, whereas there are 15 zettels with the tag "National League". (In all examples here
index.db
is populated by the zettels inzg-tutorial/zettels/baseball
.)zfind
seems to be handling the space character as the operator OR.The expected outcome is achieved in this case by joining the search terms with an underscore:
zfind --database index.db --query-string 'tags:"National_League"' --count
Yet the behavior of
zfind
is stranger than this initial example suggests, as shown by the results of the following queries:These two queries return 9 and 6 zettels, respectively.
The first query (for the string "AL Central") returns the five zettels with the tag "AL Central" plus four zettels in which the word-token "AL" does not appear in the tags. (The four false returns have the tags "NL Central" and "National League".) In this case
--query-string 'tags:"AL Central"'
is not equivalent to--query-string 'tags:"AL" | tags:"Central"'
. Something else is going on. What?The second query (for "AL_Central") returns the five correct zettels plus
los-angeles-angels.yaml
. Again, I do not understand why.The text was updated successfully, but these errors were encountered: