> I am running in to the same issue. I have tried to replace
> my
> WhitespaceTokenizerFactory with a PatternTokenizerFactory
> with pattern
> (\s+|-) but I still seem to get a phrase query. Why is
> that?

It is in the source code of QueryParser's getFieldQuery(String field, String 
queryText)  method line#660. If numTokens > 1 it returns Phrase Query. 

Modifications in analysis phase (CharFilterFactory, TokenizerFactory, 
TokenFilterFactory) won't change this behavior. Something must be done before 
analysis phase.

But i think in your case, you can obtain match with modifying parameters of 
WordDelimeterFilterFactory even with PhraseQuery.


      

Reply via email to