Answers.Body: <p>I think this blog does a reasonable job of describing it <a href="https://civicrm.org/blog/spidersilk/understanding-civicrm-dedupe-rules" rel="nofollow noreferrer">https://civicrm.org/blog/spidersilk/understanding-civicrm-dedupe-rules</a></p>
  
  <p>Here are the official docs</p>
  
  <p><a href="https://docs.civicrm.org/user/en/latest/common-workflows/deduping-and-merging/" rel="nofollow noreferrer">https://docs.civicrm.org/user/en/latest/common-workflows/deduping-and-merging/</a></p>
  
  <ul>
  <li>but we could do with pulling some in from the docs</li>
  </ul>
  
  <p>Basically you need to check your weights - if you have them both set to '5' &amp; the threshold is 10 then you need both for a dupe. If the threshold is 5 then either/or</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-19T09:53:09.223Z
Answers.Text: Thank you @eileen. These two articles are very useful!
  
  Unfortunately, it's still not working for me.
  
  I've set the right threshold to work as AND but they still do not match name AND SURNAME.
  
  Please see screenshots here:
  
  [link]https://snag.gy/yxYSjk.jpg
  [link]https://snag.gy/bKy3jO.jpg
Answers.UserDisplayName: Marco
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-19T08:51:58.463Z
Answers.LastActivityDate: 2019-07-19T08:51:58.463Z
Answers.UserDisplayName: eileen
Answers.Body: <p>Welcome to CiviCRM SE. Eileen's answer is definitely the right place to start, but you might want to look at a related question that I asked about the built-in (reserved) de-duplicate rules, as they aren't entirely clear from the documentation. It says "NAME" in the description, but actually uses the fields "First Name" and "Last Name" (You have used different terminology. It took me a while to work out how it worked.</p>
  
  <p>See <a href="https://civicrm.stackexchange.com/questions/29155/reserved-de-dupe-rules">Reserved de-dupe rules</a></p>
  
  <p>Update: Remembering odd behaviour with my previous issues, I looked again and have found that the de-dupe rules appear to be cached. So if you create a rule, adjust it and try with the new version, the old version is still used. I missed this before because I was checking the database and the rule is updated properly there. If you go to Administer >> System >> Cleanup Caches and Update Paths and select Cleanup Caches then try the de-dupe rule again it works as expected. If you were experimenting, then I expect this is the problem.</p>
  
  <p>Alternatively if you delete the rule and add the new version it will also work.</p>
  
  <p>A note on the page where you edit de-dupe rules to tell you to clear the cache would be very helpful. Let me know if this solves your problem and I'll report it as a bug/enhancement.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-19T10:18:54.700Z
Answers.Text: Thank you @Mick Kahn
  
  Unfortunately that's a little bit beyond me. And for what I get, it doesn't address my issue.
  
  I just want to create a simple rule to search for duplicate contacts that have the same First Name AND Last Name.
  
  I do not have any built-in rule to do so.
  
  The weird thing is that when I create a rule with "Fist Name" (in Italian = Nome) and "Last Name" (in Italian = Cognome) with proper weights, the rule still searches for First Name OR Last Name to match duplicates.
  
  Please see screenshots here:
  
  [link]snag.gy/yxYSjk.jpg
  
  [link]snag.gy/bKy3jO.jpg
Answers.UserDisplayName: Marco
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-19T13:47:47.290Z
Answers.Text: This reminded me that I say some strange results when I was testing before and so I did some more testing and have updated my answer, which may solve things.
Answers.UserDisplayName: Mick Kahn
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-22T06:30:00.237Z
Answers.Text: Great! Cleaning the cache worked perfectly. And yes: it would be nice to have a reminder.
  
  Thank you!
Answers.UserDisplayName: Marco
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-19T09:43:57.453Z
Answers.LastActivityDate: 2019-07-19T13:55:38.750Z
Answers.LastEditDate: 2019-07-19T13:55:38.750Z
Answers.UserDisplayName: Mick Kahn
Body: <p>I'm just starting to use CiviCRM. So I realize that this could be a very dumb question.</p>
  
  <p>I'm trying to deduplicate contacts by name AND surname. When I create a new deduplicating rule using name and surname, it looks like it gets all the contacts with the same name OR surname.</p>
  
  <p>For example, if I have </p>
  
  <ul>
  <li>Mario Rossi</li>
  <li>Mario Verdi</li>
  <li>Mario Bianchi</li>
  <li>Mario Neri</li>
  </ul>
  
  <p>they are all shown as duplicates...but they are not.</p>
  
  <p>Is there a way to create a rule which addresses just contacts with same name AND surname (or vice versa)?</p>
  
  <p>Thank you in advance.</p>
  
Tags: <duplicate-contacts>
Title: Deduplicate by name AND surname (or vice versa)?
ThreadText: # Deduplicate by name AND surname (or vice versa)?
  
  (Asked by: username_0 on 2019-07-19)
  
  I'm just starting to use CiviCRM. So I realize that this could be a very dumb question.
  
  I'm trying to deduplicate contacts by name AND surname. When I create a new deduplicating rule using name and surname, it looks like it gets all the contacts with the same name OR surname.
  
  For example, if I have
  
  * Mario Rossi
  * Mario Verdi
  * Mario Bianchi
  * Mario Neri
  
  they are all shown as duplicates...but they are not.
  
  Is there a way to create a rule which addresses just contacts with same name AND surname (or vice versa)?
  
  Thank you in advance.
  
  **Tags:** duplicate-contacts
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2019-07-19. Score: 3 | Accepted answer
  
  Welcome to CiviCRM SE. username_1's answer is definitely the right place to start, but you might want to look at a related question that I asked about the built-in (reserved) de-duplicate rules, as they aren't entirely clear from the documentation. It says "NAME" in the description, but actually uses the fields "First Name" and "Last Name" (You have used different terminology. It took me a while to work out how it worked.
  
  See [Reserved de-dupe rules](https://civicrm.stackexchange.com/questions/29155/reserved-de-dupe-rules)
  
  Update: Remembering odd behaviour with my previous issues, I looked again and have found that the de-dupe rules appear to be cached. So if you create a rule, adjust it and try with the new version, the old version is still used. I missed this before because I was checking the database and the rule is updated properly there. If you go to Administer >> System >> Cleanup Caches and Update Paths and select Cleanup Caches then try the de-dupe rule again it works as expected. If you were experimenting, then I expect this is the problem.
  
  Alternatively if you delete the rule and add the new version it will also work.
  
  A note on the page where you edit de-dupe rules to tell you to clear the cache would be very helpful. Let me know if this solves your problem and I'll report it as a bug/enhancement.
  
  > **Comments:**
  > **username_0**: Thank you @username_2  Unfortunately that's a little bit beyond me. And for what I get, it doesn't address my issue.  I just want to create a simple rule to search for duplicate contacts that have the same First Name AND Last Name.  I do not have any built-in rule to do so.  The weird thing is that when I create a rule with "Fist Name" (in Italian = Nome) and "Last Name" (in Italian = Cognome) with proper weights, the rule still searches for First Name OR Last Name to match duplicates.  Please see screenshots here:  [link]snag.gy/yxYSjk.jpg  [link]snag.gy/bKy3jO.jpg  
  > **username_2**: This reminded me that I say some strange results when I was testing before and so I did some more testing and have updated my answer, which may solve things.  
  > **username_0**: Great! Cleaning the cache worked perfectly. And yes: it would be nice to have a reminder.  Thank you!  
  
  ---
  
  ### Answer by username_1 on 2019-07-19. Score: 2
  
  I think this blog does a reasonable job of describing it <https://civicrm.org/blog/spidersilk/understanding-civicrm-dedupe-rules>
  
  Here are the official docs
  
  <https://docs.civicrm.org/user/en/latest/common-workflows/deduping-and-merging/>
  
  * but we could do with pulling some in from the docs
  
  Basically you need to check your weights - if you have them both set to '5' & the threshold is 10 then you need both for a dupe. If the threshold is 5 then either/or
  
  > **Comments:**
  > **username_0**: Thank you @username_1. These two articles are very useful!  Unfortunately, it's still not working for me.  I've set the right threshold to work as AND but they still do not match name AND SURNAME.  Please see screenshots here:  [link]https://snag.gy/yxYSjk.jpg [link]https://snag.gy/bKy3jO.jpg  
  
  ---
  
  