In order to dispatch queries to a particular search setup (cirrus defaults vs wikibase custom query builder) we need a flexible way to classify queries.
Not all search setup may support the variety available in the search syntax.
Introduce a classification mechanism where extension could register their classifiers.
The query classes will be lazy loaded while trying to dispatch the query to a particular query builder.
By default the repository of classifiers will include :
- simple_bag_of_words: e.g. `foo bar`
- simple_phrase: e.g. `"foo bar"`
- bag of words with phrase: e.g. `foo "bar baz"`
- expert query: e.g. `foo OR bar` or anything that we consider being an expert usage (i.e. search keywords)
- bogus query: e.g. `foo AND bar NOT`
Note that a query may belong to multiple classes.