>
> It is in the source code of QueryParser's getFieldQuery(String field,
> String queryText)  method line#660. If numTokens > 1 it returns Phrase
> Query.
>
That's exactly the question. Would be nice to hear from someone as to why is
it that way?

Cheers
Avlesh

On Mon, Jan 11, 2010 at 5:10 PM, Ahmet Arslan <iori...@yahoo.com> wrote:

>
> > 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