On 7 Nov 2005, at 08:27, Anton Potehin wrote:
I have two fields in the index called "first" and "second". Is it
possible to make search using following condition: the "first" field
must have "car" and the "second" field must have "java" or "sun"? If it
is possible, please tell me how?

Using QueryParser, this expression would give you the query you desire:

    first:car AND second:(java OR sun)

Using the API, you can construct this query using BooleanQuery with two required clauses, the first clause being a TermQuery for car on the "first" field, and the second clause being a nested BooleanQuery with two optional TermQuery's for java and sun on the "second" field.

    Erik



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

Reply via email to