Note: This add-on and its description were generated by Claude (an AI model by Anthropic), based on requirements I gave it.
Rating Search
Adds search terms to Anki's Browser so you can find cards by their review history: which button you pressed on a particular rating, or how many times a card has been rated.
Search by a particular rating
Format: userrating:N:R
- N is which rating: 1 = first, 2 = second, and so on
- R is the button: 1 = Again, 2 = Hard, 3 = Good, 4 = Easy
Examples:
userrating:1:1: the first rating was Again
userrating:2:3: the second rating was Good
Search by number of ratings
totalratings:=2 or totalratings:2: rated exactly 2 times
totalratings:<=2: rated 2 times or fewer
totalratings:>=2: rated 2 times or more
totalratings:<2: rated fewer than 2 times
totalratings:>2: rated more than 2 times
totalratings:=0: no ratings
Search by ratings from the first one
Format: ratingfromfirst:R,R,R
List the buttons in order, starting with the first rating: 1 = Again, 2 = Hard, 3 = Good, 4 = Easy. You can list any number of ratings, separated by commas with no spaces.
ratingfromfirst:1,1,1: the first three ratings were all Again (same as userrating:1:1 userrating:2:1 userrating:3:1)
ratingfromfirst:1,3: the first rating was Again and the second was Good
Cards with more ratings afterwards also match. To match a history of exactly three ratings, use ratingfromfirst:1,1,1 totalratings:=3
Combining searches
You can use these with other Anki searches, including -, or and brackets:
deck:Default userrating:1:1
userrating:1:1 -userrating:2:3
(userrating:1:1 or userrating:1:2) totalratings:>=3
Note that -userrating:2:3 also includes cards that have fewer than 2 ratings.
What counts as a rating
- Every answer button press saved in the review history counts, including learning steps, same-day repeats and logged filtered-deck reviews.
- Manual changes without a button press, such as rescheduling, don't count.
- After a card is reset, the first rating still means the first one in its saved history. Reviews missing from the history can't be counted.
- Reviews from Anki's old scheduler are matched by their stored button number, which may not match today's button names.
Limitations
- Works in the desktop Browser only, not in filtered decks, AnkiDroid or AnkiMobile.
- In Notes mode, notes are matched through their cards. When you combine terms, each card must satisfy the combined search.
- An invalid term such as
userrating:1:5 shows a pop-up with the correct format. Ignore the results of that search.
Testing
by AI: Search logic was tested with the Anki 26.09.4 Python libraries and made-up review history. The Browser hook was checked using a stand-in for the Browser window. The AI testing did not include the actual app window.
I myself tested on anki 26.11b1 and it works correctly.