Flattens a query tree to its unique positive (non-negated) terms. Used by
backends that only offer a single OR-ish full-text search field (e.g. Magento
search): send all positive terms as one query to get a broad candidate pool,
then refine with the client-side boolean predicate.
Extracts the positive (non-negated) OR-groups from a query tree as a disjunctive-normal-form-ish list: the outer array is OR-ed alternatives, and each inner array is an AND-group of phrases. Negated branches are dropped, since a keyword-only backend has nothing positive to search for in them.