Re: BooleanQueryBuilder is not adding parenthesis around the query

2020-01-22 Thread Edward Ribeiro
= builder.build(); > >> > >> This booleanQuery.toString() will be: > >> > >> (+text:toys +text:children) age:12 > >> > >> That is the parsing of "(text:child AND text:toys) OR age:12" > >> > >> > >> Edward > >> > >> On Tue, Jan 21, 2020 at 5:24 PM Arnold Bronley > > >> wrote: > >> > > >> > Hi, > >> > > >> > BooleanQueryBuilder is not adding parenthesis around the query. It > >> > only adds + sign at the start of the query but not the parentheses > >> around > >> > the query. Why is that? How should I add it? > >> > > >> > booleanQueryBuilder.add(query, BooleanClause.Occur.MUST) > >> > > >

Re: BooleanQueryBuilder is not adding parenthesis around the query

2020-01-22 Thread Arnold Bronley
; BooleanQuery booleanQuery = builder.build(); >> >> This booleanQuery.toString() will be: >> >> (+text:toys +text:children) age:12 >> >> That is the parsing of "(text:child AND text:toys) OR age:12" >> >> >> Edwa

Re: BooleanQueryBuilder is not adding parenthesis around the query

2020-01-22 Thread Arnold Bronley
lder.build(), BooleanClause.Occur.SHOULD); > builder.add(query3, BooleanClause.Occur.SHOULD); > > BooleanQuery booleanQuery = builder.build(); > > This booleanQuery.toString() will be: > > (+text:toys +text:children) age:12 > > That is the parsing of "(text:chil

Re: BooleanQueryBuilder is not adding parenthesis around the query

2020-01-22 Thread Edward Ribeiro
ery.Builder builder = new BooleanQuery.Builder(); > builder.add(andBuilder.build(), BooleanClause.Occur.SHOULD); > builder.add(query3, BooleanClause.Occur.SHOULD); > > BooleanQuery booleanQuery = builder.build(); > > This booleanQuery.toString() will be: > > (+text:toys +text:childr

Re: BooleanQueryBuilder is not adding parenthesis around the query

2020-01-22 Thread Edward Ribeiro
children) age:12 That is the parsing of "(text:child AND text:toys) OR age:12" Edward On Tue, Jan 21, 2020 at 5:24 PM Arnold Bronley wrote: > > Hi, > > BooleanQueryBuilder is not adding parenthesis around the query. It > only adds + sign at the start of the query but n

BooleanQueryBuilder is not adding parenthesis around the query

2020-01-21 Thread Arnold Bronley
Hi, BooleanQueryBuilder is not adding parenthesis around the query. It only adds + sign at the start of the query but not the parentheses around the query. Why is that? How should I add it? booleanQueryBuilder.add(query, BooleanClause.Occur.MUST)