The way a search runs now, we call apachesolr_search_execute(), which calls apachesolr_do_query(), and then apachesolr_search_process_response(). Both of those functions take $params as an argument, but apachesolr_do_query has all of the alters() and modifies() and finalizes(), and it is a common case that $params is a different beast by the time apachesolr_search_process_response() comes about. Yet having the right $params is crucial to apachesolr_search_process_response() being able to do its job correctly. Thus, the easiest solution for the time being, without refactoring the whole search flow, is to make &$params a reference into apachesolr_do_query().

CommentFileSizeAuthor
params_by_reference.patch874 bytesrobertdouglass

Comments

robertdouglass’s picture

Status: Active » Needs review
pwolanin’s picture

sounds reasonable to me

jpmckinney’s picture

Marking #875158: Pagination error duplicate (which has same patch).

robertdouglass’s picture

Status: Needs review » Fixed

#899560 by robertDouglass: Fixed apachesolr_do_query() has to take $params by reference.

mkalkbrenner’s picture

Version: 6.x-2.x-dev » 6.x-1.x-dev
Status: Fixed » Patch (to be ported)

Because #892524: apachesolr_do_query() breaks custom highlighting has been marked as duplicate of this issue I reopened this one to request this fix to be ported to 6.x-1.x.
As long as this issue exists in 6.x-1.x we're not able to release a stable version of Apache Solr Multilingual 6.x-1.0 because we don't have snippets in the search results.

robertdouglass’s picture

Status: Patch (to be ported) » Fixed

fiexFixed in 6.1 as well.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.