Reputation: 3269
Using Solr 6, for e-commerce catalog with search and filtering.
I need to exclude all products for certain category? Not sure how to do that in Solr. Can you give some idea, how can we achieve that?
Note that, CategoryID is a multi valued string field, as one product can be assigned to multiple categories.
Upvotes: 2
Views: 2288
Reputation: 3044
Use the boolean "NOT" operator.
* NOT CategoryID:111
Alternative syntax :
* -CategoryID:111
* !CategoryID:111
Upvotes: 1