The only ways I can see to create a PhraseQuery are:
QueryParser.parse, adding"to the start and end of the string (being careful to escape any special characters).PhraseQuery.addwhich needs theTerms to have been pre-analyzed.
Is there a way to construct a PhraseQuery by just applying the Analyzer to a String that is to be understood literally, and hasn't been manipulated as a query?