Thank You Mitch. I have a query mentioned below : (my defaultOperator is set to "AND")
(field1 : This is a good string AND field2 : This is a good string AND field3 : This is a good string AND (field4 : ASCIIDocument OR field4 : BinaryDocument OR field4 : HTMLDocument) AND field5 : doc) This is not giving me the desired results. I want all documents with field1 = ' This is a good string' and field2 = 'This is a good string' and field3 = ' This is a good string' and (field4 = 'ASCIIDocument' or ' BinaryDocument' or ' HTMLDocument') and field5 = 'doc' to be returned. I am not sure why this is not giving me the desired results. Thanks, Sandhya -----Original Message----- From: MitchK [mailto:mitc...@web.de] Sent: Monday, April 19, 2010 2:19 PM To: solr-user@lucene.apache.org Subject: Re: Help using boolean operators Hello Sandhya, title: star AND wars NOT sdi This query will match every document where "star" *and* "wars" occur but *not* the term "sdi" (SDI => Strategic Defense Initiative => in the media there was often the term star wars used to describe the project). title: star OR wars This query will match every document where "star" *or* "wars" occur. If your standard operator (defined in your schema.xml) is the OR, you don't need to add the "OR" operator to your query. Standard-operator: OR title: star wars This is the same as title: star OR wars standard-operator: AND title: star wars - > the same as title: star AND wars standard-operator: AND title: star wars NOT sdi is the same as: title: star AND wars NOT sdi Hope this helps. Kind regards - Mitch -- View this message in context: http://n3.nabble.com/Help-using-boolean-operators-tp729102p729135.html Sent from the Solr - User mailing list archive at Nabble.com.