OK, so I'm currently doing this:

booleanQuery.add(new QueryParser(org.apache.lucene.util.Version.LUCENE_40,
"tags", new
WhitespaceAnalyzer(org.apache.lucene.util.Version.LUCENE_40)).parse(phrase[i]);
 , BooleanClause.Occur.SHOULD);

I just want to add single terms to my booleanQuery. if I pass a query to the
add method, am I considering the single terms ?

thanks



On 21 March 2011 22:15, Ahmet Arslan <iori...@yahoo.com> wrote:

> > Date: Monday, March 21, 2011, 7:39 PM
> > One more thing: It is actually not
> > clear to me how to use PhraseQuery... I
> > thought I can just pass a phrase to it, but I see only
> > add(Term) method...
> > should I parse the string by myself to single terms ?
>
> Yes, you need to do it.
>
> QueryParser transforms String into Query.
>
>
> http://lucene.apache.org/java/2_9_3/api/core/org/apache/lucene/queryParser/QueryParser.html
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
> For additional commands, e-mail: java-user-h...@lucene.apache.org
>
>

Reply via email to