The NOT operator isn’t a Boolean NOT, so it requires some care, Chris Hostetter wrote a good blog about that. Try
q=*:* -(<solr_field_name>:*c* The query q=-something really isn’t valid syntax, but some query parsers help you out by silently putting the *:* in front of it. that’s not guaranteed across all parsers though. Best, Erick > On Oct 16, 2019, at 8:14 AM, Prasenjit Sarkar <prasenjit.sar...@tcs.com> > wrote: > > Hi, > > > I am facing issue while working with solr streamimg expression. I am using > /export for emiting tuples out of streaming query.Howver when I tried to use > not operator in solr query it is not working.The same is working with /select. > > > Please find the below query > > > top(n=105,search(<collection_name>,qt="/export",q="-(<solr_field_name>: *c*) > ",fl="<filed list>",sort="<sort_field> asc"),sort="<sort_field> asc") > > > > In the above query the not operator q="-(<solr_field_name>: *c*)" is not > working with /export.However the same query works when I combine any postive > search criteria with the not expression like q="-(<solr_field_name>: *c*) AND > (<solr_field_name>: **)". Can you please help here. As running only not query > with /export should be a valid use case. I have also checked the solr logs > and found no errors when running the not query.The query is just not > returning any value and it is returning with no result very fast. > > > > > > Regards, > Prasenjit Sarkar > > ____________________________________________ > Experience certainty. IT Services > Business Solutions > Consulting > ____________________________________________ > =====-----=====-----===== > Notice: The information contained in this e-mail > message and/or attachments to it may contain > confidential or privileged information. If you are > not the intended recipient, any dissemination, use, > review, distribution, printing or copying of the > information contained in this e-mail message > and/or attachments to it are strictly prohibited. If > you have received this communication in error, > please notify us by reply e-mail or telephone and > immediately and permanently delete the message > and any attachments. Thank you > >