The Browse search box, saved searches, custom study sessions (search kind) and insight
links use Anki’s search syntax. The parser and SQL compiler are in
crates/loci-core/src/search/.
dog anywhere in the note’s text (HTML removed), also inside doggy
"a dog"
the exact phrase a dog; cloze markup is read as its text, so "Paris is in France" finds {{c1::Paris}} is in {{c2::France::country}}
d*g
* matches any run of characters: dg, dog, dung
d_g
_ matches one character: dog, dig
w:dog
dog as a whole word (not doggy); w:dog* matches words starting with dog
nc:uber
ignores accents and other combining marks: matches über
re:(?i)^colou?r
a regular expression on the raw field HTML of any field
sc:the cat
text inside cloze deletions counts ({{c1::cat}} matches the cat)
\*, \_, \", \\, \:, \(, \), \-
the literal character
Plain text searches are case-insensitive. Terms of three characters or more use the full-text
index (fast, case-insensitive in every script, including Arabic and CJK); shorter terms and
terms with wildcards use a scan that folds case for ASCII letters only, as Anki does.
prop: compares a number with <, >, <=, >=, = or !=.
You type
Finds
prop:ivl>=30
interval of at least 30 days
prop:due=1
due tomorrow; prop:due<0 overdue; prop:due<=2 within two days
prop:reps>10, prop:lapses>=8
answered more than 10 times; lapsed 8 times or more
prop:ease<2.0
SM-2 ease under 200%
prop:pos<=100
new cards at position 100 or earlier
prop:r<0.9
FSRS retrievability (chance of recall now) below 90%, for every card with a memory state whatever its queue (review, learning, relearning, suspended, buried); days since the last review come from the card’s last-review time, else its due day, else its latest answer
prop:s>90
FSRS stability over 90 days
prop:d>0.8
FSRS difficulty above 80% (0–1 scale)
prop:rated=-1
answered yesterday; prop:resched>-7 rescheduled in the last week
Field searches and re: see the field’s HTML; plain text searches see the text without HTML.
This is also Anki’s behaviour. Unlike Anki, plain text searches also see cloze deletions as the
text they reveal (markers and hints removed), so a phrase can span a cloze boundary; search the
markup itself with re: or a field search (text:*c1::*).
prop:r covers learning and relearning cards that have a memory state, not only review cards.
Filtered decks are not kept as decks in Loci, so deck:filtered normally finds nothing.
Searches that need a custom SQL function in Anki (fields, re:, nc:, w:, sc:, wildcard tags,
dupe:) are evaluated in two steps: SQL narrows the candidates, then an exact check runs on each.
The results are the same; very broad regular expressions on huge collections are slower.