When setting Nodequeue Biasing values at admin/config/search/apachesolr/settings/solr/bias settings are not stored and search remains unaffected.

Comments

pau1_m’s picture

Issue summary: View changes
pau1_m’s picture

It appears that apachesolr module 1.7 does not use variable_set to store indexing variables and instead puts them in the table apachesolr_environment_variable. Nodequeue is calling variable_get to retrieve values that will never exist.

fizk’s picture

@pau1_m Do you know which version of apachesolr made the switch to using apachesolr_environment_variable?

charginghawk’s picture

charginghawk’s picture

StatusFileSize
new1.54 KB

I've submitted an apachesolr patch that alleviates this issue - there's a switch in there that's blocking hook_form_alter values:

#2492427: Switch in apachesolr_search_bias_form_submit blocking hook_form_alter values

Meanwhile, I'm attaching a patch that in conjunction with the above apachesolr patch allows you to change and save settings.

This is only a partial fix, because the changed setting aren't having any impact on search results that I can see. A complete fix probably involves updating the nodequeue_apachesolr_query_alter function to use apachesolr_environment_variable_get instead of variable_get.

charginghawk’s picture

StatusFileSize
new3.68 KB

Here's a patch that gets it another step closer. If you remove the switch in the apachesolr function, and apply this patch to nodequeue, then the integration works. You can set bias, and see its effect in the search results.

Unfortunately, it doesn't look like apachesolr's going to accept my patch, so before this is truly complete, an additional submit handler has to be added to save the variables.

charginghawk’s picture

Status: Active » Needs review
StatusFileSize
new4.67 KB

Here's the third iteration, a complete patch - with the addition of an extra submit handler, it can now independently get apachesolr integration up and running. Some code cobwebs had to be dusted out, but I've tested this and can say it works like a charm.

caspervoogt’s picture

the patch from #7 worked for me. Thanks charginghawk!

  • fizk committed beb727b on 7.x-2.x
    Issue #2415083 by charginghawk: Biasing values not stored with Solr
    
fizk’s picture

Status: Needs review » Fixed

Thanks! Committed.

Status: Fixed » Closed (fixed)

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