Reputation: 6291
How do you filter by custom attribute in GetCandy?
I'm trying to filter search results on a GetCandy website, currently, I am using the API like so:
/api/v1/search?brand=hasbro&type=product
but it seems to still be giving me back all the results, am I missing something?
Upvotes: 0
Views: 216
Reputation: 462
It looks like the query string is correct, for a custom attribute to be filterable you need to make sure it's got filterable
checked in the attributes
table.
Also, when you make changes to attributes you may need to re-run
php artisan candy:search:index
Just because there are potential changes to the index mapping and currently with Elasticsearch you can't update this on an existing index.
Upvotes: 1