lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Willnauer <simon.willna...@googlemail.com>
Subject Re: MultiFieldQueryParser
Date Sun, 17 Oct 2010 10:39:08 GMT
On Thu, Oct 14, 2010 at 3:04 AM, Lev Bronshtein
<lev_bronshtein@hotmail.com> wrote:
>
> Hi Group,
>
> I have an isue when using MultiFieldQueryParser, I would like to use one query against
a number of fields however I get an
> java.lang.IllegalArgumentException: queries.length != fields.length
>
> Looked at the javadoc, and it looks like the only way to run one query against multiple
fields is to define flags for every field
> See http://lucene.apache.org/java/3_0_2/api/all/index.html, the very last parse method. 
All I really want to do is just run a query against multiple fields, is there a simple way?

Why don't you use the parse method without the flags?

  public static Query parse(Version matchVersion, String[] queries,
String[] fields,
      Analyzer analyzer) throws ParseException

simon
>
> Regards,
>
> Lev Bronshtein
>
>
>
> ---------------------------------------------------------------------
> 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