Changes
As of 0.9.9.7, the tagging system has changed. Tags can no longer contain spaces, and the tag separator is a space instead of a comma.
There were two reasons for this change:
- the editor now supports searching for multiple tags at once, and search terms are separated by a space
- inputting tags with spaces instead of commas makes for faster input.
When you upgrade, your tags, model tags, and card model names will be changed so that " " is now "-".
Searching
Simple Searches
You can use the tag dropdown box like before if you wish. You'll see that when you select something, the search area reflects your selection. For example, if you select the tag Foo, the search box will show:
tag:Foo
This means search for all tags that exactly match "Foo".
You can type these searches in yourself. For example:
tag:Foo tag:*bar*
.. which means search for all facts with the tag "Foo", and a tag with "bar" in it.
The difference between a search for "Foo" and a search for "tag:Foo" is that the latter will only find facts tagged with "Foo" but will not a Foo in any in other field.
Searching Substrings
When searching for tags you can use a * as a wildcard to search within tags.
This means that you can now make your tags shorter. For example, in previous versions of Anki, you may have had the tags:
MyBook, MyBook-Chapter1, MyBook-Chapter1-Verbs
This can be changed to:
MyBook-Chapter1 Verbs
After this change you can find all cards in your book using:
tag:mybook*
Or you could find only Chapter 1 using:
tag:mybook-chapter1
Complex Searches
You can also combine tag search to find facts matching more specific criteria. For example, the following search can be used to find any verbs in mybook:
tag:mybook* tag:verbs
A more complex example might be to use a three tiered tagging system:
tag:MyBook2-Chapter3-Vital
You could then search for any tag in Chapter 3 using:
tag:MyBook2-Chapter3*
Or you could find the all of your most crucial vocabulary using:
tag:*Vital
Multiple wildcards can also be used:
tag:*Chapter3*
When using wildcards, care should be taken not to accidentally create overlapping tags. To illustrate these, consider the example of "tag:*Vocab" which would return any facts tagged with the following two tags:
MyBook2-Chapter3-VitalVocab MyBook2-Chapter3-Vocab
