And the problem is? I think it is just brackets. E.g. Field1:(X Y) AND Field2:Z
No? On 9 Oct 2012 10:14, "neosky" <neosk...@yahoo.com> wrote: > I want to implement a query in Solr like the follow > ((X OR Y) AND Z) … ((X ∨ Y) ∧ Z) > BooleanQuery q = new BooleanQuery(); > BooleanQuery inner = new BooleanQuery(); > inner.add(X, Occur.SHOULD); > inner.add(Y, Occur.SHOULD); > q.add(inner, Occur.MUST); > q.add(Z, Occur.MUST); > > For example, I want to query > (Field1=X or Field1=Y ) and Field2=Z > > Thanks! > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/How-to-use-complicated-boolean-query-tp4012649.html > Sent from the Solr - User mailing list archive at Nabble.com. >