Incorporate searchLimit in dedupe cacheKey
authoreileen <emcnaughton@wikimedia.org>
Sun, 1 Sep 2019 23:34:02 +0000 (11:34 +1200)
committereileen <emcnaughton@wikimedia.org>
Mon, 2 Sep 2019 20:52:45 +0000 (08:52 +1200)
commit997a03fe8fd367ec54b99aaf08012075fe8b8206
treec10043b4a7ab4f4c64add3fb63863990f68fbfdf
parent149ab5853c93c3cd495ae0014e053d28a4dfc5d6
Incorporate searchLimit in dedupe cacheKey

When accessing dedupes by the api call or on the dedupe screen it's possible to pass in
a searchLimit param. This works like the group limit in that it limits the number of
contacts for whom a match is sought. For example if there are 2million contacts in the database
and you have a search limit of 0 then it will look for duplicates for all 2 million. (unset
is the same as 0). If you have a search limit of 1000 it will look for matches for the first
1000 contacts that match the criteria (criteria could be the group or other criteria passed in
via the url although the api is the most obvious way to pass in criteria)

Note there is a separate limit (sometimes called batch limit) that limits results from within
the found matches.

To test the searchLimit it is possible to add limit=5 to the url generated in the
url by findContacts. Without this patch changing the limit once the search has been done
will not alter the results as the limit is not part of the cachekey - this patch
changes that.
CRM/Contact/Form/Merge.php
CRM/Contact/Page/AJAX.php
CRM/Contact/Page/DedupeFind.php
CRM/Contact/Page/DedupeMerge.php
CRM/Core/BAO/PrevNextCache.php
CRM/Dedupe/Merger.php
api/v3/Dedupe.php
api/v3/Job.php
tests/phpunit/CRM/Dedupe/MergerTest.php