All the reviews for all the hotels or all the reviews for all the matched hotels? Your query doesn't look like the latter, and the latter would make sense.
For the latter, it should be something like this: +(hot.id:AAA OR hot.id:BBB) rev.hot.id:AAA rev.hot.id:BBB Otis -- Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch ----- Original Message ---- > From: Ankush Goyal <ankush.go...@orbitz.com> > To: "solr-user@lucene.apache.org" <solr-user@lucene.apache.org> > Sent: Thursday, April 30, 2009 6:56:44 PM > Subject: BooleanQuery > > Hey Guys, > > I have 2 indexes with one having hotel content and other containing reviews > for > hotels. When a user queries for a location the logic first calls the hotel > index > to get hotels for the location, then it needs to call review index to ask for > all the reviews for all the hotels. So, I need to create a boolen query with > baseQuery as a Should and various hotel-Ids 'ORed' with each other. I am > creating something like: > > (+(rev.headline:beach^2.0) | rev.comments:beach^2.0)~0.01 ()) (+hot.id:5823 > +hot.id:5847) > > But, I seem to be getting wrong results, any ideas whether my query is wrong > or > right? > > -Ankush