lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tatu Saloranta <t...@hypermall.net>
Subject Re: About Query...
Date Mon, 17 Mar 2003 15:02:55 GMT
On Monday 17 March 2003 04:32, Pierre Lacchini wrote:
> sorry for my poor english...
>
> Well if i perform a Multiple Fields query... Why do I have to specify the
> name of the field in the parse method ?
> Because i'm using 2 field in the query...

Query parser has to know which field term should be matched against by 
default, if user does not explicitly specify field, and that field is passed 
to query constructor. At this point actual query is not known; it's passed 
with parse methods, and parser can be used multiple times (although it's not 
re-entrant).

Method you are calling is a convenience method that just creates a new parser 
for this particular query, then calls non-static parse method.

I _think_ you can just pass null (or dummy field name) in your case if you are 
absolutely sure fields for all terms are defined in query.

-+ Tatu +-


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message