For some reason, the TermQuery is not returning any results, even when
querying for a single word (like on*).

query = new TermQuery(new Term(LABEL_FIELD, searchString));

On 8/25/08, Daniel Naber <[EMAIL PROTECTED]> wrote:
> On Montag, 25. August 2008, Andre Rubin wrote:
>
>>  I tried it out but with no luck (I think I did it wrong). In any
>> case, is MultiPhraseQuery what I'm looking for? If it is, how should I
>> use the MultiPhraseQuery class?
>
> No, you won't need it. If you know that the field is not really tokenized
> (no matter whether by using UN_TOKENIZED or KeywordAnalyzer) you should
> create a TermQuery directly, without using the QueryParser. The
> QueryParser interprets AND, OR, and NOT, and a space is just a default
> for "OR", so using KeywordAnalyzer won't have the desired effect.
>
> Regards
>  Daniel
>
> --
> http://www.danielnaber.de
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to