From: kroky6@users.sourceforge.net - 2024-10-02 10:48:54
|
Revision: 86714 http://sourceforge.net/p/tikiwiki/code/86714 Author: "kroky6" Date: 2024-10-02 10:48:51 +0000 (Wed, 02 Oct 2024) Log Message: ----------- [FIX] manticore index optimization: do field cleanup only when selecting all the fields from the table Modified Paths: -------------- trunk/lib/core/Search/Manticore/Index.php trunk/lib/core/Search/Manticore/PdoClient.php Property Changed: ---------------- trunk/ Index: trunk =================================================================== --- trunk 2024-10-02 10:43:05 UTC (rev 86713) +++ trunk 2024-10-02 10:48:51 UTC (rev 86714) Property changes on: trunk ___________________________________________________________________ Deleted: subgit:lock:273c9b90b308e78be5d60a9ff849e90ea1d5dbc8 ## -1 +0,0 ## -2024-10-02T10:43:41.773 \ No newline at end of property Added: subgit:lock:7e052f14adefd25ac4ca442a4c3b006376d833ef ## -0,0 +1 ## +2024-10-02T10:48:50.903 \ No newline at end of property Modified: trunk/lib/core/Search/Manticore/Index.php =================================================================== --- trunk/lib/core/Search/Manticore/Index.php 2024-10-02 10:43:05 UTC (rev 86713) +++ trunk/lib/core/Search/Manticore/Index.php 2024-10-02 10:48:51 UTC (rev 86714) @@ -432,7 +432,7 @@ $sql .= ' ' . $facets; } - $results = $this->pdo_client->fetchAllRowsets($sql); + $results = $this->pdo_client->fetchAllRowsets($sql, false, ! empty($selectionFields)); $result = $results[0]; $meta = $this->pdo_client->fetchAll('SHOW META'); Modified: trunk/lib/core/Search/Manticore/PdoClient.php =================================================================== --- trunk/lib/core/Search/Manticore/PdoClient.php 2024-10-02 10:43:05 UTC (rev 86713) +++ trunk/lib/core/Search/Manticore/PdoClient.php 2024-10-02 10:48:51 UTC (rev 86714) @@ -344,7 +344,7 @@ * @param boolean $retry * @return array of associative arrays */ - public function fetchAllRowsets($query, $retry = true) + public function fetchAllRowsets($query, $retry = true, $hasCustomSelect = false) { $available_fields = \TikiLib::lib('unifiedsearch')->getAvailableFields(); try { @@ -351,7 +351,10 @@ $result = []; $stmt = $this->query($query); while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { - if ($row['object_type'] == 'trackeritem') { + if ($hasCustomSelect) { + $fields = []; + } + elseif ($row['object_type'] == 'trackeritem') { $fields = $available_fields['object_types']['trackeritem' . $row['tracker_id']] ?? []; } else { $fields = $available_fields['object_types'][$row['object_type']] ?? []; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |