Thanks MIchael and Erick. With your valuable comments I finally managed to get the expected result out of the query.
Regards, VJ On Mon, Apr 24, 2017 at 8:17 PM, Erick Erickson <erickerick...@gmail.com> wrote: > Michael's comments are spot on, and the deeper thing you should be > aware of is that Solr query parsing does not implement strict boolean > logic, see Chris Hostetter's excellent blog here: > https://lucidworks.com/2011/12/28/why-not-and-or-and-not/ > > As Michael suggests, parenthesizing carefully can make the parsing > behave like boolean logic. > > Best, > Erick > > On Mon, Apr 24, 2017 at 4:05 AM, Michael Kuhlmann <k...@solr.info> wrote: > > Make sure to have a whitespace are the OR operator. > > > > The parenthesises should be around the OR query, not including the "fq:" > > -- this should be outside the parenthesises (which are not necessary at > > all). > > > > What exactly are you expecting? > > > > -Michael > > > > Am 24.04.2017 um 12:59 schrieb VJ: > >> Hi All, > >> > >> I am facing issues with OR/AND conditions with query parameters: > >> > >> fq=cioname:"XYZ" & (fq=attr1:trueORattr2:true) > >> > >> The queries are not returning expected results. > >> > >> I have tried various permutation and combinations but couldn't get it > >> working. Any pointers on this? > >> > >> > >> > >> Regards, > >> VJ > >> > > >