On 11/15/2019 10:15 AM, rhys J wrote:
I'm trying to exclude results based on the documentation about the boolean
NOT symbol, but I keep getting errors.
I've tried:
http://localhost:8983/solr/debt/select?q=clt_ref_no:-”owl-2924-8”
and
http://localhost:8983/solr/debt/select?q=clt_ref_no:NOT”owl-2924-8”
I have tried with and without quotes too.
Am I not able to use the NOT with a textField?
You've got the NOT keyword and the - character misplaced.
q=*:* AND NOT clt_ref_no:owl-2924-8
q=*:* -clt_ref_no:owl-2924-8
In a URL, use a + sign in place of a space.
In a simple case like this, the purely negative query can be detected by
Solr and fixed internally, but for the most part, purely negative
queries do not work. You have to start with something and then
subtract, you can't subtract from nothing. That is why my examples have
the all docs (*:*) starting point.
The errors are a little strange, but I'm guessing the misplaced
characters are resulting in something the query parser doesn't know how
to handle.
Thanks,
Shawn