lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gusenbauer Stefan <>
Subject Re: Multiple field search problem
Date Mon, 25 Apr 2005 14:44:36 GMT
Victor Abeytua wrote:

> Hello everyone,
>    In the project I'm currently involved we are using lucene (+
> Digester) to index a small number of XML files. To be able to perform
> the searches I want, I should need to query the index with something
> similar to (where fieldN are XML tags):
> (field1:"Policy and planning" OR  field1:Newspapers) AND field2:Spanish
>    I haven't been able to find any class that suits my needs and if I
> try to use QueryParse.parse() to be able to write the query in "human"
> form, the analyzer takes the "and" away and changes the string to
> lower case. This is something I can't afford as I need to be able to
> search by the exact keywords.
>    Any ideas are welcome. Perhaps the answer is right in front of me
> but I haven't been able to figure it out.
>    Thanks in advance,
>    Victor Abeytua
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:
The lowercasing depends on the analyzer you use perharps you've only put
them into apostrophs like this " if you instanciate the Queryparser you
can specifiy which Boolean operand should be used if no operand is
given. With query.toString() you get the query in an human readable
format for with + for and and so on.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message