Lesson 11← back to roadmap
Reach for EQL when filter dicts stop being expressive enough. It compiles to the same QueryPlan the SDKs use.
Statement grammar
text
search in <collection>
nearest <[literal] | $binding>
[k <int>]
[threshold <number>]
[where <filter>]
[rank_by <distance | field>]
[project <* | f1, f2, ...>]
yield
get from <collection> id "<string-id>" yield
scan in <collection> [where ...] [offset N] [limit N] yield
add in <collection> vector [...] [metadata {...}]
delete from <collection> id "<string-id>"Filter grammar
text
filter := term (("and" | "or") term)* | "not" filter | "(" filter ")"
term := field <comparator> value
| field "in" [ value, ... ]
| field "contains" "substring"
comparator := = | != | < | <= | > | >=Run from Python
python
client.query_eql("""
search in articles
nearest $embedding
k 10
where category = "technology" and published_year >= 2023
project title, author
yield
""", {"embedding": embed(query)})Run from the CLI
bash
elips query /my_db --eql 'search in docs nearest [0.1,0.2,0.3] k 5 yield'
elips query /my_db --file ranking.eql