-
Notifications
You must be signed in to change notification settings - Fork 342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Categories and Kinds should be handled the same #104
Comments
Actually, all filters seem like they should be handled the same, including |
Yep, the |
I've been trying to get this to work for languages and categories, but haven't had any luck. I'm not quite sure what I'm doing wrong, but it's not a priority, so I'm gonna focus on more important things. If we do revisit this, what would the expected behavior be, that checking multiple languages shows you locations that support ALL those languages, or ANY location that supports ANY of the checked languages? |
Hmm, it could go either way I guess, but I think the last scenario, any location that supports any of the checked languages. That would be comparable behavior to the kinds anyway. Supporting all languages would be cool, but perhaps that could be together under one parameter, such as something like: Results that are spanish or arabic or both: Results that are spanish and arabic |
This was actually fixed when we implemented Postgres full-text search earlier this year. You can search for multiple categories at once, which will find locations that match either of the categories. For example: https://ohana-api-demo.herokuapp.com/api/search?category[]=Food&category[]=Health As for support for searching on multiple languages, I just pushed that in #227. |
The
kind
andcategory
filters are equivalent kinds of searches, so it seems like they should be handled the same. Currently the kind is an array parameter (kind[]
) and the category is a single parameter (category
). Having them consistent with each other would simplify client handling of these two types of filters, as the same kind of logic could be used for handling both.The text was updated successfully, but these errors were encountered: