api
api copied to clipboard
fix(dedupe): consider category in deduplication
Fixes #1460
Open for discussion: Based on the other comparison methods, I considered records are the same if:
- one of them is missing the category fields, or it is empty
- at least one category match in both records
Looks good to me :+1:
Did you get a chance to test it out? Did it fix your transit stop issue?
Did you get a chance to test it out? Did it fix your transit stop issue?
Yes, that solved my issue. Thanks.
Hey @bboure, Thanks for the next day code delivery, very speedy :)
I think we will have to consider a record with no categories different from one with categories. For example, your example query for Manneken pis shows the same results with your changes (which I've put on the Geocode Earth dev server) because the statue record does not have any categories.
I believe lots of OSM records do not have categories, so there would be a lot of cases where this PR would not change much.
If you get a chance to try out that change, feel free to add it to your PR. Otherwise we may try it out as well.
@orangejulius Sorry, I did not notice that. In my case I do have a category because I am using a custom category mapper.
I will add that change to the PR.