lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doron Cohen <DOR...@il.ibm.com>
Subject Re: MultiFieldQueryParser.parse deprecated. What can I use?
Date Tue, 25 Jul 2006 17:22:16 GMT
(Seems 1.9 javadoc could be just a bit more clear on this.)
The following should do the work:
   QueryParser qp = new MultiFieldQueryParser(fields[], analyzer);
   Query = qp.parse(qtext);
Notice the difference in semantics as explained in the "deprecated" comment
in 1.9.
Also see the setDefaultOperator() in the (2.0) constructor.

Regards,
Doron

paulo.silveira@gmail.com wrote on 24/07/2006 22:22:08:

> Hello
>
> What can I use as a drop in replacement? I mean, about the (String,
> String[], Analyzer) one.
>
> The 1.9.1 javadoc says to use QueryParser.parse, but I need to
> construct the query first. Any util method or do I need to do the for?
> If this is the solution, maybe it is more elegant to use the for to
> create a big BooleanQuery, .adding new BooleanClause.Occur.Must
> clauses each loop?
>
> thanks
>
>  --
> Paulo E. A. Silveira
> Caelum Ensino e Soluções em Java
> http://www.caelum.com.br/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>


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