Amrun wrote:

Thanks for your answers,

I've tried to use the MultiFieldQueryParser and it works quite good. But now
I need to know how the operators like "+" or AND are working together? I have a searchmask at which you can choose e.g. the title, subject, class,
categoriy, teacher and so on and I need to combine the given keywords. Say I want to get all the presentations from the class 5 from the teacher xy
where the keywords are "security" "lucene" and so on. So I would combine the "presentations" with the "5" and teacher "xy" with
PLUS and the keywords with " "? I don't really know how this operators work
together.
Hope someone can help me


Try to use MultiFiledQueryParser I posted yesterday... when I came to the same problem as you I read that I sould create "virtual" field keywords or smth like that, but it didn't fit into my app, 'couse I had same values for different fields. So I created 2 new methods for mapping one on one for fields and query strings for that fields... I use those two methods in implementation of advanced search where user can search onto multiple fields whit condition of finding all or finding anything. It looks smth like that:

field1: query1
field2: query2
...
fieldN: queryN

If you need to find all, just use flags with value required and that works for my case.

Andraz


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to