[TikiWiki-commits] [Git][tikiwiki/tiki][28.x] [FIX] manticore 1000 field limit issue and ItemLink nullable values upon import
"Victor Emanouilov \(@kroky\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <69400b9a7ef1d_2a17f84062d@gitlab-sidekiq-low-urgency-cpu-bound-v2-55c9b978c9-r4d8z.mail> |
Victor Emanouilov pushed to branch 28.x at Tiki Wiki CMS Groupware / Tiki
Commits:
ef4b4b21 by Victor Emanouilov at 2025-12-15T15:22:29+02:00
[FIX] manticore 1000 field limit issue and ItemLink nullable values upon import
- - - - -
2 changed files:
- lib/core/Search/Manticore/PdoClient.php
- lib/core/Tracker/Field/ItemLink.php
Changes:
=====================================
lib/core/Search/Manticore/PdoClient.php
=====================================
@@ -475,6 +475,9 @@ class PdoClient
$sql = "SELECT " . ($fields ? implode(',', $fields) : '*') . " FROM $table WHERE object_type = '$type' AND object_id IN (" . implode(',', array_fill(0, count($object_ids), '?')) . ")";
//Without a LIMIT clause, Manticore Search only returns the top 20 matched documents in the result set by default.
$sql .= " LIMIT 0, $resultCount ";
+ if ($resultCount > 1000) {
+ $sql .= ' option max_matches=' . $resultCount;
+ }
$stmt = $this->prepareAndExecute($sql, $object_ids);
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
$result['rows'][$original_order[$row['object_type'] . $row['object_id']]] = $row;
=====================================
lib/core/Tracker/Field/ItemLink.php
=====================================
@@ -1318,7 +1318,7 @@ class Tracker_Field_ItemLink extends \Tracker\Field\AbstractItemField implements
$getParseIntoTransformFunction = function ($separator) use ($permName, $invertField) {
return function (&$info, $value) use ($separator, $permName, $invertField) {
$itemIds = [];
- foreach (explode($separator, $value) as $val) {
+ foreach (explode($separator, (string) $value) as $val) {
if ($id = $invertField->get($val)) {
$itemIds[] = $id;
}
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/ef4b4b211814808c1c0c96d93cdfc5663383127f
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/ef4b4b211814808c1c0c96d93cdfc5663383127f
You're receiving this email because of your account on gitlab.com.
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs