I’ve written a QueryParser that is looks a little like Lucene’s QueryParser. I’ve written a simple QParser and a QParserPlugin with which I can use my QueryParser.
One question that remains is: Where do I get a reference to the Analyzer configured in the Solr schema? Or how can I inject it to use the Analyzer into my query parser’s constructor?
Here is my (simplified) solution in Java for using the configured Analyzer (and default field) from the schema file in
MyQueryParser.