Skip to content

Commit

Permalink
Merge branch 'm38_MDL-66140_Mitigate_PECL_Solr_issue_Ref_72740' of ht…
Browse files Browse the repository at this point in the history
  • Loading branch information
junpataleta committed Aug 15, 2019
2 parents 4d56b58 + 4634211 commit 5611d0c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion search/engine/solr/classes/engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,10 @@ public function add_fields($query) {
$query->addField($key);
if ($dismax && !empty($field['mainquery'])) {
// Add fields the main query should be run against.
$query->addQueryField($key);
// Due to a regression in the PECL solr extension, https://bugs.php.net/bug.php?id=72740,
// a boost value is required, even if it is optional; to avoid boosting one among other fields,
// the explicit boost value will be the default one, for every field.
$query->addQueryField($key, 1);
}
}
}
Expand Down

0 comments on commit 5611d0c

Please sign in to comment.