Operations
The comparison a filter uses to keep a record, set with the op
attribute on a
listing-filter or
count-filter. Each compares a record’s
field to a value, according to the field’s type,
so numbers and ISO dates compare in order rather than as text. Every operation is a record in the
reference search.
Comparison operators
| Operation | Matches when | Example |
|---|---|---|
eq | the field equals the value | op="eq" value="published" |
ne | the field differs from the value | op="ne" value="draft" |
lt | less than (numbers, ISO dates) | op="lt" value="2026-01-01" |
lte | less than or equal | op="lte" value="10" |
gt | greater than | op="gt" value="0" |
gte | greater than or equal | op="gte" value="2026-01-01" |
contains | the value appears anywhere in the field | op="contains" value="caddy" |
starts | the field starts with the value | op="starts" value="How" |
ends | the field ends with the value | op="ends" value=".md" |
An op outside this set is reported against the page and the listing or count, and the site
is left unchanged until it is fixed. The same operators serve both a
listing and a count.