BoostingFilterBase

  • boost_fq
    Type: string · Boost Fq

    Defines a query in Elasticsearch query-string syntax (Lucene) that can be used to boost a subset of products to the top of the ranking, or to specific boost positions (See boost_positions parameter below.) For example, the query below will promote all the relevant products whose brand is Nike to the top of recommendation list:

    {
        "boost_fq": "brand:\"Nike\""
    }
    

    For a slightly more complex example, the query below will promote the Nike products which have also been tagged as ON SALE to the top of the ranking:

    {
       "boost_fq": "brand:\"Nike\" AND tags:\"ON SALE\""
    }
    

    It is worth mentioning that, Miso will only boost products that are relevant and have high likelihood to convert, and will not boost a low performance product only because it matches the boosting query.

    Depending on your boosting rules, in certain cases, you would like to prevent recommendation results from being too monotone due to boosting. With Miso, you have two tools to do so.

    First, you can specify boost_positions to place promoted products at specific positions in the ranking. For example, the query below will place boosted products only at the first and fourth places in the ranking (positions are 0-based), and place the remaining products in their original ranking, skipping these two positions.

    {
       "boost_fq": "brand:\"Nike\" AND tags:\"ON SALE\"",
       "boost_positions": [0, 3]
    }
    

    The second tool is diversification. diversification parameter, on a best-effort basis, will try to maintain a minimum distance between products that have the same attributes. For example, the following query will place products made by the same brand apart from each other.

    {
       "boost_fq": "brand:\"Nike\" AND tags:\"ON SALE\"",
       "diversification": {
           "brand": {"minimum_distance": 1}
        }
    }
    
  • boost_positions
    Type: array integer[] · Boost Positions

    Defines a list of 0-based positions you want to place the boosted products at.

    For example, the query below will promote products whose brand is Nike as the top and second recommendations:

    {
        "boost_fq": "brand:\"Nike\"",
        "boost_positions": [0, 1]
    }
    

    If boost_positions is not specified (which is the default behavior), all the boosted products will be ranked higher than the rest of the products.

  • boost_rule_name
    Type: string · Boost Rule Name

    Name of the boosting rule. Use this to identify a boosting rule in _boosted_rules in the response