lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Naber <lucenelist2...@danielnaber.de>
Subject Re: MultiPhrase search
Date Mon, 25 Aug 2008 18:19:17 GMT
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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message