Re: BooleanQuery questions

2007-10-03 Thread Warren
Thanks for the reply. Everything is working correctly now. I jumped the gun without debuging it more. booleanANDSearch was not getting set correctly. Erick Erickson wrote: I don't see a problem with your booleanANDSearch thingy, although I haven't tried it. Does toString() return the same stri

Re: BooleanQuery questions

2007-10-03 Thread Erick Erickson
I don't see a problem with your booleanANDSearch thingy, although I haven't tried it. Does toString() return the same string regardless of the value of booleanANDSearch? That would surprise me. The default is OR, so the toString output looks like booleanANDSearch is false. In general, the Lucene

BooleanQuery questions

2007-10-03 Thread Warren
I am new to Lucene and am having problems with booleanQueries. How do you write Boolean OR and AND queries? Is this an OR query booleanQuery.add(query1, BooleanClause.Occur.SHOULD); booleanQuery.add(query2, BooleanClause.Occur.SHOULD); and is this an AND query booleanQuery.add(query1, Boolean