Implement ApiPageSet::setRedirectMergePolicy()
authorErik Bernhardson <ebernhardson@wikimedia.org>
Wed, 7 Oct 2015 21:03:15 +0000 (14:03 -0700)
committerErik Bernhardson <ebernhardson@wikimedia.org>
Thu, 8 Oct 2015 18:36:02 +0000 (11:36 -0700)
commit1ded833de19f27d2247053897b8655f9c39de76e
tree68cbeed0d2daec550a1b3df13a0ea60209f0a46e
parent868aeed43150b5d0b387d46a2f441d317244908c
Implement ApiPageSet::setRedirectMergePolicy()

This allows generator implementations to define how generator data
about a redirect gets merged into the redirect destination.  This
does not change any defaults, only modules that explicitly set a
merge policy will have a change in their results.

This functionality is initially used for the search api modules to
retain search positions within the final result set.

Bug: T92796
Change-Id: If2f49e0fc3176288c95e870240754ee320a6bf91
RELEASE-NOTES-1.27
includes/api/ApiPageSet.php
includes/api/ApiQueryPrefixSearch.php
includes/api/ApiQuerySearch.php
tests/phpunit/includes/api/ApiPageSetTest.php [new file with mode: 0644]