Skip to content
This repository has been archived by the owner on Dec 3, 2019. It is now read-only.

Contact deduplication post-processor #27

Open
ghost opened this issue Oct 29, 2016 · 4 comments
Open

Contact deduplication post-processor #27

ghost opened this issue Oct 29, 2016 · 4 comments

Comments

@ghost
Copy link

ghost commented Oct 29, 2016

The datasource.contacts returns the entire NSOrderedSet of contacts, but a few contacts are listed multiple times because of linked contacts. Is there a way to include post processors to remove these duplicates?

@adam-zethraeus
Copy link
Contributor

A post processor which dedupes similar contacts is a good idea. We'd be keen to have one as a pull request if you're willing to write it. If not, could you file it as a feature request?

@NickEntin
Copy link
Contributor

@csimmonsbluebook By duplicate contacts, are you referring to two contacts that are equal to each other, or two contacts referring to the same person but with different fields/attributes that should be merged into a single contact? I think including a post processor to remove one of any two contacts that are equal is very reasonable, but we might want to stay away from merging contacts from multiple sources in the framework since there are a lot of parameters that can go into the merge criteria (deciding whether two contacts refer to the same person).

@ghost
Copy link
Author

ghost commented Nov 2, 2016

@NickEntin The contact fields seem to already be merged, but multiple contacts still persist. For example, I have Facebook Contacts syncing, as well as Google Contacts, and that information is merged into contacts I already have on my phone. So, I did a test of Ohana and pushed my contacts to a TableViewController and a few contacts were listed multiple times. I wrote some code to print to the Xcode terminal the contact fields and when clicking on each of the duplicates, they print the same information. Thus, I think we can do as you have said and remove any contacts that are equal in a post processor.

@zethraeus I don't think I have the time at the moment to work on trying to write a pull request, so for now I will file it as a feature request.

Edit: Since I'm not a contributor I can't label the issue as a feature request myself.

@adam-zethraeus adam-zethraeus changed the title Duplicate Contacts Contact deduplication post-processor Nov 2, 2016
@adam-zethraeus
Copy link
Contributor

@csimmonsbluebook If the contacts are field-for-field equal it seems reasonable to filter them out in a provided post processor. In the near term I'm wary of writing a post processor which filters by heuristic.

Thanks for the input. :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants