Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/facett

.nornir/widgets/facett-search.md

facett-search — design note

Status: builds (egui 0.33) + 5 tests green. In ordning/crates/widgets/facett-search; destined for facett — but note the parser is reusable beyond the GUI (it's the ordning query language, used by search, the command line, saved views, boards, automation). It may ultimately live in ordning-core, with facett-search being just the egui bar over it.

What it is

  1. parse(&str) -> Query — the ordning query-language parser (pure, no egui, heavily tested).
  2. SearchBar — an egui text input that parses-as-you-type and shows parsed clauses; take_submit() yields the Query on Enter.

Grammar (manual ch.10)

attr:value · attr:a,b (OR) · -attr:value (exclude) · attr:lo..hi (range) · has:x / has:-x · #shortcut · sort:field / sort:field-desc · bare words = full-text. "quoted" and {braced} values group multi-word values (status:{In Progress}).

AST

struct Query { clauses: Vec<Clause>, text: Vec<String>, sort: Option<Sort> }
enum Clause { Eq{attr,values,negate}, Range{attr,lo,hi}, Has{attr,negate}, Shortcut{name} }

Design decisions

Move-to-facett / TODO