Skip to Content

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

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.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Sep 02 at 05:28 PM

    Hi Hoa Nguyen Minh ,

    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).

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.