On Friday 15 November 2002 14:40, Rob Outar wrote:
> That is exactly what is happening, I was using the QueryParser class
> because I wanted to do stuff like this:
>
> field1 = value and field2 = value2 or field2 = value3
>
> But from what you are telling me I cannot use the Query Parser class
> because it tokenizes my queries?  Do I need to use a different analyzer?

I don't know precisely how the query parser deals with term values.
However, a space normally splits query terms.
The role of the query parser is to find the global structure of the query.
The term values it finds will be passed to the analyzer used in constructing
the query.
Since you constructed the term without an analyzer (you use a non tokenized
field), you might also not want to use an analyzer when constructing a query
for that field.

> The classes that extend Query I don't believe I can use because you cannot
> specify and and or's for those queries.  The MultiTermQuery class I do not
> believe I can specify and and or's for the various terms.

The BooleanQuery class allows for required and optional terms iirc,
and a term consists of a field name and a field value.

Have fun,
Ype

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

Reply via email to