Grammar and supported fields
Syntax implemented by the checked-in parser and query planner.
Query grammar
query = "DISCOVER" entry_type [ "WHERE" conditions ]
[ "ORDER BY" ordering ] [ "LIMIT" integer ] [ "OFFSET" cursor ] ;
conditions = condition { "AND" condition } ;Use exact canonical entry type names. Strings are double-quoted; numbers and booleans are typed literals. Conditions support =, !=, >, >=, <, <=, CONTAINS, CONTAINS_ALL, CONTAINS_ANY, and IN. Membership lists use parentheses.
DISCOVER * WHERE tags CONTAINS_ANY ("research", "tools") ORDER BY name ASC LIMIT 10Field validation
The parser can recognize a dotted field path without the server accepting it. search::validate_field_path defines supported canonical and payload paths; the search source reference is the exact authority. Arbitrary SQL and database column expressions are rejected.
Unsupported language
There are no joins, CTEs, grouping, aggregation, or OR. Shard/region/cluster extensions belong to the feature-gated prototype parser and must not be assumed on a normal server.
Source authority
This page describes the checked-in implementation, not the availability of a public registry.
mars-protocol/src/marsql/parser.rsmars-protocol/src/marsql/ast.rsmars-server/src/search.rs