MDL-59502 Global Search: deprecate add_documents 4 arg implementation

In MDL-59039 we introduced changes to add_documents and should return an extra $partial boolean.
We still supported implementations returning 4 elements since then,
but  this issue is about removing this 4 returned elements compatibility.
This commit is contained in:
Amaia Anabitarte
2019-06-20 18:58:17 +02:00
parent f1a8db6911
commit c5b2f2b306
2 changed files with 8 additions and 5 deletions
+1 -5
View File
@@ -1120,11 +1120,7 @@ class manager {
if (count($result) === 5) {
list($numrecords, $numdocs, $numdocsignored, $lastindexeddoc, $partial) = $result;
} else {
// Backward compatibility for engines that don't support partial adding.
list($numrecords, $numdocs, $numdocsignored, $lastindexeddoc) = $result;
debugging('engine::add_documents() should return $partial (4-value return is deprecated)',
DEBUG_DEVELOPER);
$partial = false;
throw new coding_exception('engine::add_documents() should return $partial (4-value return is deprecated)');
}
if ($numdocs > 0) {
+7
View File
@@ -1,6 +1,13 @@
This files describes API changes in /search/*,
information provided here is intended especially for developers.
=== 3.8 ===
* Search indexing supports time limits to make the scheduled task run more neatly since 3.4. In order for
this to work, search engine plugins will need to implement the 'stopat' parameter if they
override the add_documents() function, and return an extra parameter from this function (see base
class in engine.php). Unmodified plugins will not work anymore.
=== 3.7 ===
* Search areas now have categories and can optionally implement get_category_names method to