Reputation: 2715
I have a requirement where we need to fetch the values like
CustomerID NOT IN (LIST OF IDs Indexed) from SOLR Index.
Can anyone suggest how can we achieve this using solr query?.
Upvotes: 2
Views: 2547
Reputation: 1953
Use Filter query fq=-id:("id1", id:"id2")
example
http://localhost:8983/solr/collection/select?indent=on&q=querystring&wt=json&fq=-id:("id1", id:"id2")
Here it discards documents with list of IDs mentioned in filter query(fq) parameter
Upvotes: 5