Searcher Demo
Interactive visualization of the search query parser. Type a query to see how it's parsed into a structured AST.
Query Input
Enter a search query using terms, attributes (key:value), and operators (AND, OR, XOR, EXCEPT, NOT).
Available keys: first_name, last_name, job, hometown (key-only), SSN (exact-only), Bio
Parsed Structure
Enter a query above to see the parsed structure
Records (Filtered)
When the query parses successfully, the records below are re-scored and grouped by score.
Loading demo records…
Syntax Reference
Operators (by precedence, tightest first)
NOT- Complement (unary, tightest binding)AND- IntersectionEXCEPT- Difference (A minus B)XOR- Symmetric DifferenceOR- Union (loosest binding)
Primitive Syntax
- Simple terms:
foo bar baz - Quoted phrases:
"hello world" - Attributes:
name:john age:30 - Quoted attribute values:
name:"John Doe"
Grouping
- Use parentheses to override precedence:
(foo OR bar) AND baz
Examples
foo AND bar OR baz→ (foo AND bar) OR bazNOT foo AND bar→ (NOT foo) AND bara XOR b EXCEPT c→ (a XOR b) EXCEPT c