Skip to content

Commit

Permalink
MDL-70870 search_simpledb: Sort search queries via doc ID
Browse files Browse the repository at this point in the history
  • Loading branch information
junpataleta committed Jun 2, 2022
1 parent e0eef12 commit 7a87871
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion search/engine/simpledb/classes/engine.php
Expand Up @@ -181,7 +181,7 @@ public function execute_query($filters, $usercontexts, $limit = 0) {
}

// It is limited to $limit, no need to use recordsets.
$documents = $DB->get_records_select('search_simpledb_index', implode(' AND ', $ands), $params, '', '*', 0, $limit);
$documents = $DB->get_records_select('search_simpledb_index', implode(' AND ', $ands), $params, 'docid', '*', 0, $limit);

// Hopefully database cached results as this applies the same filters than above.
$this->totalresults = $DB->count_records_select('search_simpledb_index', implode(' AND ', $ands), $params);
Expand Down

0 comments on commit 7a87871

Please sign in to comment.