Skip to content
Snippets Groups Projects
Commit 34008e01 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2158229 by bzrudi71: Site search indexing broken on PostgreSQL.

parent 692dbe45
No related branches found
No related tags found
No related merge requests found
......@@ -289,7 +289,7 @@ protected function addNodeRankings(SelectExtender $query) {
public function updateIndex() {
$limit = (int) $this->searchSettings->get('index.cron_limit');
$result = $this->database->queryRange("SELECT DISTINCT n.nid FROM {node} n LEFT JOIN {search_dataset} d ON d.type = :type AND d.sid = n.nid WHERE d.sid IS NULL OR d.reindex <> 0 ORDER BY d.reindex ASC, n.nid ASC", 0, $limit, array(':type' => $this->getPluginId()), array('target' => 'slave'));
$result = $this->database->queryRange("SELECT DISTINCT n.nid, d.reindex FROM {node} n LEFT JOIN {search_dataset} d ON d.type = :type AND d.sid = n.nid WHERE d.sid IS NULL OR d.reindex <> 0 ORDER BY d.reindex ASC, n.nid ASC", 0, $limit, array(':type' => $this->getPluginId()), array('target' => 'slave'));
$nids = $result->fetchCol();
if (!$nids) {
return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment