According to the documentation for the search
filter operator (see https://tiddlywiki.com/#search%20Operator) , you can precede it with an exclamation point (!
) to find tiddlers that do not have the specified search term(s), like this:
<<list-links "[search:text[apple]] +[!search:key[pear]]">>
Note that this will find key
fields that contain “pear” or “pearl” or even “appearance”, since all of those text values match the substring “pear”.
However, If your key
field is list of space-separated items, you could use the contains
filter operator (see https://tiddlywiki.com/#contains%20Operator) like this:
<<list-links "[search:text[apple]] +[!contains:key[pear]]">>
This will first parse the key
field contents as a list and then look for items that are an exact match for the specified value, so that “pearl” and “appearance” won’t be considered as a match for “pear”.
Also, note that if the key
field is expected to have just a single literal text value (i.e., NOT a list of values), then you can skip the search
or contains
filter operators and use the field
filter operator (see https://tiddlywiki.com/#field%20Operator) instead, like this:
<<list-links "[search:text[apple]] +[!field:key[pear]]">>
and, because “…the syntax of a filter step treats any unrecognised filter operator as if it was the suffix to the field operator…”, you can simplify this further to just
<<list-links "[search:text[apple]] +[!key[pear]]">>
enjoy,
-e