cancel
Showing results for 
Search instead for 
Did you mean: 

Solr How to add boost factor to double field without specifying value

sai_hoa_nguyen
Explorer
0 Kudos
410

Hi Experts,

My issue is described below:

My Ecommerce website is using Sap Commerce Hybris 6.2. There is solr field called "sale_revenue_double" described the total revenue of product. When customer searches a text in global search box, the set of products result will be returned.

My requirement is: I want to boost the products with higher sale revenue just a little bit to make the product with high sale revenue easily display in the tops of result.

It doesn't a sort by sale revenue, because the result is always displayed tops with highest sale revenue products, it may not expected with the search text term. So i just want to add, look like a small boost factor to that field, so the product with high sale revenue lift up just a little bit in the result.

when I added boost factor for this field, it needs to be specified the value, such as bq=(sale_revenue_double:200000^10.0), but with my case, the value (200000) doesn't make sense, because we don't need to specify the specific revenue, we just care the high revenue in the result will be lift a little bit. So i'm getting trouble with it and don't have solution with this requirement.

Experts if anyone have any ideas to resolve this issue, please help me.

Thanks a lot in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi sai_hoa.nguyen ,

It is possible, using function query feature in Solr.

use bq={!func}field(sale_revenue_double) --> it will boost products by sales revenue.

e.g. product p1 has sales revenue 10000, then it gets boosted by 10000. Product p1 will be boosted by its sales revenue i.e 10000.

It will help to rank relevant & higher sales revenue products at higher rank (TOP).