After setting Type Biasing for a content type to 21.0 at admin/settings/apachesolr/content-bias, there is no change in the search results. In fact, none of the biasing seems to change the search results at all.

I have also tried adding a boost at query time and setting it to a very high number via hook_apachesolr_modify_query ($params['bq'][] = 'type:news^21000') and there is still no change in the displayed search results.

I've searched through the issue queue on 'boost' and 'bias', but don't see any reason for this in the existing issues.

Any ideas? Has this problem been reported before?

Comments

drawk’s picture

I should note that when I was debugging this, I was able to see the boost query in the $params object, so it is there (even when being set through the admin interface). I also attempted to add at query time directly to the $query object as well as $params (ie. $query->params['bq'][] = 'type:news^21000')

I have also tried with different fields (boosting terms in 'title', address fragments in 'url') with the same results. 'type' isn't my ultimate target, but the most straightforward to test with when trying to sort this out. My ultimate target, and the one I initially coded, was to boost items with a particular 'url' field match.

pwolanin’s picture

Version: 6.x-1.2 » 6.x-1.x-dev

Can you check to see whether it's in the final request URL?

I don't think any of this code has changed recently, but please update to the latest 6.x-1.x.

Docc’s picture

I have a similar problem with the D7 version.
The url is build correct. But the solr server does nothing with the bq fields.

If i debug the request on the solr server it doesnt do anything with those fields in the internal queries. Though If i put the boost query in the main query it works.

ex, this works: select/?start=0&rows=10&q=label:battlefield%20AND%20bundle:article^2

this does not: select/?start=0&rows=10&q=label:battlefield&bq=bundle:article^2

pwolanin’s picture

Status: Active » Fixed

It sounds like you are not using the correct solrconfig.xml so dismax is not the default query parser.

Status: Fixed » Closed (fixed)

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