v0.7.0

Operators and FIND

Last updated


This page lists the comparison operators shared by FIND and QUERY and shows how FIND compares them against raw values.

Operators


FIND and QUERY share filter.AtoOperation (case-insensitive):
NamesMeaning
EQ, =String equality
NE, !=String inequality
GT, >Numeric greater than
GTE, GE, >=Numeric greater than or equal
LT, <Numeric less than
LTE, LE, <=Numeric less than or equal
LIKEText match with * at the ends

Numeric operators parse both sides as float64 and are false when either side is not a number.
LIKE patternMatches when the value
prefix*starts with prefix
*suffixends with suffix
*part* or partcontains part
*always

FIND


  1. FIND eq active
  2. FIND gt 100 LIMIT 20
  3. FIND like *embedded database* LIMIT 10

Every token after the operator, except a trailing LIMIT <n>, is joined with single spaces into the comparison value. FIND compares against every entry's raw string, including JSON documents as text.

中文