mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Merge branch 'MDL-68776' of https://github.com/paulholden/moodle
This commit is contained in:
commit
cd53dbb5fe
2 changed files with 7 additions and 20 deletions
|
@ -1289,15 +1289,8 @@ class manager {
|
|||
if ($batches !== $numdocs + $numdocsignored) {
|
||||
$batchinfo = ' (' . $batches . ' batch' . ($batches === 1 ? '' : 'es') . ')';
|
||||
}
|
||||
} else if (count($result) === 5) {
|
||||
// Backward compatibility for engines that don't return a batch count.
|
||||
[$numrecords, $numdocs, $numdocsignored, $lastindexeddoc, $partial] = $result;
|
||||
// Deprecated since Moodle 3.10 MDL-68690.
|
||||
// TODO: MDL-68776 This will be deleted in Moodle 4.2.
|
||||
debugging('engine::add_documents() should return $batches (5-value return is deprecated)',
|
||||
DEBUG_DEVELOPER);
|
||||
} else {
|
||||
throw new coding_exception('engine::add_documents() should return $partial (4-value return is deprecated)');
|
||||
throw new \coding_exception('engine::add_documents() should return 6 values');
|
||||
}
|
||||
|
||||
if ($numdocs > 0) {
|
||||
|
@ -1454,19 +1447,8 @@ class manager {
|
|||
if ($batches !== $numdocs + $numdocsignored) {
|
||||
$batchinfo = ' (' . $batches . ' batch' . ($batches === 1 ? '' : 'es') . ')';
|
||||
}
|
||||
} else if (count($result) === 5) {
|
||||
// Backward compatibility for engines that don't return a batch count.
|
||||
[$numrecords, $numdocs, $numdocsignored, $lastindexeddoc, $partial] = $result;
|
||||
// Deprecated since Moodle 3.10 MDL-68690.
|
||||
// TODO: MDL-68776 This will be deleted in Moodle 4.2 (as should the below bit).
|
||||
debugging('engine::add_documents() should return $batches (5-value return is deprecated)',
|
||||
DEBUG_DEVELOPER);
|
||||
} 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 6 values');
|
||||
}
|
||||
|
||||
if ($numdocs > 0) {
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
This files describes API changes in /search/*,
|
||||
information provided here is intended especially for developers.
|
||||
|
||||
=== 4.2 ===
|
||||
|
||||
* Support for optional final element returned by engine `add_documents()` implementations is now removed, all
|
||||
six expected returned array elements must be present
|
||||
|
||||
=== 3.10 ===
|
||||
|
||||
* Search indexing now supports sending multiple documents to the server in a batch. This is implemented
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue