You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have been creating notes using the hashtags #caresteouvert and #DE to easily filter notes created by the Ca reste ouvert project by country.
➡️ Unfortunately querying notes for #caresteouvert #DE didn't properly filter using these hashtags, but instead using the words caresteouvert and de (as in "details").
As a reaction, we changed the hashtagging to #caresteouvert #caresteouvert_DE.
➡️ Unfortunately querying notes for #caresteouvert_DE still had exactly the same result.
As a workaround, we will probably migrate to #caresteouvertDE, but it would be great if the Notes API filtering implementation could be adjusted to better accoung for hashtags and hashtags including underscores.
Actually, this is quite similar to #2585
The search method is so simple that it doesn't suit most use cases. I also have no clue if it would be a good idea to add additional logic to the search... Maybe it would be better to use a different service than the API directly in order to search and filter notes (and show them in the interface of NotesReview), like @tomhughes already pointed out in #2585. The only problem is that I'm not aware of any service like that.
I really would like to work on something similar, the only thing that keeps me from doing is, is that the notes database dump is only generated on a daily basis. It is nice that they are exported every day, but often this seems to be a long time. @tomhughes Is there some possibility to get the notes from the database in real time?
One way I could think of is simply fetching the notes from the API in a given interval by the time they were last updated (https://api.openstreetmap.org/api/0.6/notes/search.json?sort=updated_at) and importing it in some kind of database.
We have been creating notes using the hashtags
#caresteouvert
and#DE
to easily filter notes created by the Ca reste ouvert project by country.➡️ Unfortunately querying notes for
#caresteouvert #DE
didn't properly filter using these hashtags, but instead using the wordscaresteouvert
andde
(as in "details").As a reaction, we changed the hashtagging to
#caresteouvert #caresteouvert_DE
.➡️ Unfortunately querying notes for
#caresteouvert_DE
still had exactly the same result.As a workaround, we will probably migrate to
#caresteouvertDE
, but it would be great if the Notes API filtering implementation could be adjusted to better accoung for hashtags and hashtags including underscores.See also: ENT8R/NotesReview#57
According to @ENT8R, the search string filtering happens here (which might be where the fix could happen):
openstreetmap-website/app/controllers/api/notes_controller.rb
Line 277 in 8199002
The text was updated successfully, but these errors were encountered: