Download & Extend

apachesolr_do_query() breaks custom highlighting

Project:Apache Solr Search Integration
Version:6.x-1.2
Component:Code
Category:bug report
Priority:major
Assigned:Unassigned
Status:closed (duplicate)

Issue Summary

The function apachesolr_do_query() introduced by #759638: refactor code to make it possible for multiple modules to run a search breaks custom highlighting in search snippets.
If parameter hl.fl gets modified by an implementation of hook_modify_query() it will be lost because you do not hand over $params as a reference.

This breaks Apache Solr Multilingual.

AttachmentSizeStatusTest resultOperations
highlight.patch1.68 KBIgnored: Check issue status.NoneNone

Comments

#1

sorry there's some formatting in the patch. the important part is:

-function apachesolr_do_query($caller, $current_query, $params = array('rows' => 10), $page = 0) {
+function apachesolr_do_query($caller, $current_query, &$params, $page = 0) {
+  if (empty($params)) {
+    array('rows' => 10);
+  }
+

#2

Status:needs review» closed (duplicate)

Duplicate of #899560: apachesolr_do_query() has to take &$params by reference.