Open tuxayo opened 4 years ago
Well as you have observed the search is very simple and it just passes the work of to postgres so unless you have some suggestions as to how to make that do what you want there isn't much we can do.
Generally speaking using the API for search is a bad idea and you're usually better off using third party services which specialise in that - we should probably get rid of all the search endpoints really.
Thanks for the analysis. Your are making good points, I'll pass the message downstream.
In the event going toward supporting this in the API would the unaccent extension be a solution? There is also the "Poor man's solution" (creating a FUNCTION that does this) Both are detailed here:
Oh there are ways of attacking the problem, but they are major projects requiring reindexing of the production database, not simple tweaks.
The question is how much effort do we want to expend on fixing something that we're really looking to retire in the long term.
When I search for "caméra" or "camera" I get different results.
https://api.openstreetmap.org/api/0.6/notes/search?q=cam%C3%A9ra
https://api.openstreetmap.org/api/0.6/notes/search?q=camera
Related source code: https://github.com/openstreetmap/openstreetmap-website/blob/8199002a0fd83a6eec91764bcec9e9e8705c7e5d/app/controllers/api/notes_controller.rb#L277
Downsteam issue: https://github.com/ENT8R/NotesReview/issues/46