开发者

Querying Solr using dismax, field not showing up in debug score

I'm storing a set of products in solr as documents. I'm separating out name, description, keywords, and product category name into separate fields so that I can boost them independently using the dismax handler. All the fields are stored as "text" in the same way.

I'm passing these four fields in the fl param to the dismax handler, and I'm also specify开发者_运维百科ing them with a boost in the qf field. Not every record (document) has a category name associated with it, but the problem I have is that even when the category name comes back in the query results, I do not see the boost I am applying to that field taking effect in the debug output of the solr query.

Does anyone have an idea of why this could be?


I had the same problem. Boosting a field in the "qf" parameter has no effect on the score. For example, if you were trying to boost the category field when searching for "technology", here is what I thought would work followed by what actually worked.

Did not work: &fq=name description keywords category^2

If you add the "bq" parameter, you should see changes in the score:

Worked: &bq=category:technology^2
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜