api icon indicating copy to clipboard operation
api copied to clipboard

fix(dedupe): consider category in deduplication

Open bboure opened this issue 3 years ago • 4 comments

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

bboure avatar Jul 08 '20 08:07 bboure

Looks good to me :+1:

Did you get a chance to test it out? Did it fix your transit stop issue?

missinglink avatar Jul 08 '20 08:07 missinglink

Did you get a chance to test it out? Did it fix your transit stop issue?

Yes, that solved my issue. Thanks.

bboure avatar Jul 08 '20 09:07 bboure

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 avatar Jul 08 '20 14:07 orangejulius

@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.

bboure avatar Jul 08 '20 17:07 bboure