Re: Creating composite query in lucene

2016-03-09 Thread sandeep das
Hi Jack, Thanks a lot for your suggestion. Regards, Sandeep On Tue, Mar 8, 2016 at 8:32 PM, Jack Krupansky wrote: > BooleanQuery can be nested, so you do a top-level BQ that has two clauses, > the first a TQ for a:x and the second another BQ that itself has two >

Re: Creating composite query in lucene

2016-03-08 Thread Jack Krupansky
BooleanQuery can be nested, so you do a top-level BQ that has two clauses, the first a TQ for a:x and the second another BQ that itself has two clauses, both SHOULD. -- Jack Krupansky On Tue, Mar 8, 2016 at 4:38 AM, sandeep das wrote: > Hi, > > I'm using lucene-5.2.0 and

Creating composite query in lucene

2016-03-08 Thread sandeep das
Hi, I'm using lucene-5.2.0 and in query interface I wish to compose a query like "a=x and (b=y or d=z)" Which can be described as If any document has value "x" for field "a" and field "b" has value "y" or field "d" has value "z" then that document should be chosen. There are three fields in my