-
-
Notifications
You must be signed in to change notification settings - Fork 400
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
Make facets start with a prefix #11241
Comments
If we change URLs, then maybe it would be good to think a bit more about what URLs we want. Adding a prefix for facets is a good idea. Another one that we floated around was to get rid of the translation of facet type. e.g. instead of having https://fr.openfoodfacts.org/categorie/bananes , we use /category/ In fact I think it would be even better to get rid of the plural / singular distinction. Today: /categories -> list of facets, that links to /category/bananas (or /categorie/bananes) in French. I think it would make sense to always use the plural tag types: /f/categories and always with the English name for the tag type (but keeping the local name for the tag value I think). e.g. in French: /f/additives/e330-acide-citrique , (but not /f/additives/e330-citric-acid ) |
I agree with it @stephanegigandet. Letting the translation of the facet name goes makes me a bit less enthusiast, but if it really cuts complexity, let's do it. |
Well, it's a choice, we can decide which change we want:
we could do 1. and 2. only. I don't think we should do 4. We may want to do 3. but it is not necessary. we could also do this:
another choice to make: /f or /facets ? /p or /product ? |
A minor question is: should /f alone redirect to the home page or list available facets. I would prefer redirect to the home page for now, but it might help discoverablity to list available facets. |
/f to return a list of facets is a good idea I think. It would make more sense to use /facets instead of /f. |
What about /c/bananas ? Also, one thing for multi-languages, and stability is usually adding a stable id /c/bananas-id12345 |
I don't understand you point @teolemon It does not help identify facets if you don't put /f or /facets before. For the id, what would it be ? We don't have such an id yet ! |
Personal preference: understandable and readable / editable / guessable urls. :) So avoid abbreviations, use /facets/categories/bananas instead of /f/c/bananas-4234 |
I do not see it as an issue. Either the user has to learn to type facets+categories or just categories. In all cases you need to explain it. |
My main point is stable ids in urls, in addition to text. |
Problem
It's currently very difficult to tell if a url is a "facet" search.
Proposed solution
Prefix facets uri with a "f/".
/categories
-- becomes ->f/categories
/category/speculaas
-- becomes ->f/category/speculaas
Make old facets redirect uri to the new uris (permanent redirect)
I think the redirection can be done by apache (it is as fast as checking if first uri part is a taxonomy name), because generating all urls for nginx might be a bit cumbersome.
Additional context
This can help with:
Generally it's a good thing to be able to easily tell what kind of content a URL is.
The text was updated successfully, but these errors were encountered: