Neat idea! As an engineer, I think writing the parser for your query would be great, but I think it’s a lot to ask Grandma or Grandpa to type.
I think we’d be able to get the same functionality with a much simpler query grammar. People are used to Google-style searches, so I expect that would be most intuitive: for every word, try to add it as an “and” term, and if it starts with a minus sign, add it with “and not.”
I think union queries could be handled with parenthesis and using the word “or”.
For each term, if it’s prefixed with a type (like
who:alice) that wouldn’t match hits on other indexes, like pathnames, titles, descriptions, or other metadata. No prefix means look everywhere for that term.
Does that sound workable?
(I actually designed the grammar and parser for one of the first “faceted search” engines on the internet: it’s so nice to have SQLite’s FTS index built in already!)