-
Notifications
You must be signed in to change notification settings - Fork 179
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
Remove feature.id checks for event deduplication #298
Conversation
As per #293 (comment), it might make sense to use a stringified version of the whole feature as our de-duplication criterion. This would mean that users would not need to ensure uniqueness across their Tests to come. |
I think this is a reasonable approach. |
Hello, hope it's okay that I butt in. I've encountered this bug in a bit of a different context: If the user decided to legitimately enter the same address twice the second search flow will not trigger 'result' event. Have you considered clearing out |
Hey @sashako thanks for jumping in! Could you describe a bit more about this use case? In what cases is the user attempting to enter the same address twice in a row? I've not yet considered this. I'm not opposed to resetting the |
I can't speak for @sashako, but I tested a use case where there is no |
Deduplicating events by feature id was introduced in #229. While this prevents duplicate
result
events (tristen/suggestions#13), it introduces (at least) two undesirable side effects.This PR aims to fix the above two issues.
My initial thought is to use the
place_name
instead of the feature's ID as a field to deduplicate on. This should work for case (2) above, because the two addresses will have different place_names. However, for the local geocoder, if some features share the same place_name, the same behavior will continue to occur. While I expect that most users will have unique place names in their data, there is no requirement for uniqueness, so perhaps we should not rely on this alone.Alternate approaches include:
(1) adding additional checks to see if the results came from the local Geocoder
(2) attempting (again) to solve the duplicate result emission in the suggestions library.
npm run docs
and commit changes to API.mdmaster
heading before merging