--- On Fri, 1/28/11, abhayd <ajdabhol...@hotmail.com> wrote:
> From: abhayd <ajdabhol...@hotmail.com> > Subject: NOT operator not working > To: solr-user@lucene.apache.org > Date: Friday, January 28, 2011, 8:45 AM > > i have a field in xml file <DeviceType>Accessory Data > / Memory</DeviceType> > solr schema field declared as <field > name="deviceType" type="text" > indexed="true" stored="true" /> > > I am trying to eliminate results by using NOT. For example > I want all > devices for a term except where DeviceType is not > Accessory* > > SO here is what i m trying > /solr/select?indent=on&version=2.2&q=(sharp+AND+-deviceType:Access*)&qt=dismax&wt=standard > > But for some reason its giving me all results for "sharp" > irrespective of > what devicetype is > > It works fine with fq=-deviceType:Accessory but due to some > other > application constraint we want to use > q=(sharp+AND+-deviceType:Access*) Wildcard queries are not analyzed. For example if you have an lowercase filter at index time, you should lowercase your query manually. Instead of fq=-deviceType:Access* you should use fq=-deviceType:access*