# Ranking adjustments

{% hint style="info" %}
Boosts can only be applied to indexed fields.
{% endhint %}

### Filter boost <a href="#filter-boost" id="filter-boost"></a>

Filter boosts are a great way to promote and personalize results. Combined with conditions, they provide a powerful tool to adjust the ranking of your search results to optimize your business metrics.

A filter boost is defined by two fields, a [filter expression](https://docs.search.io/documentation/fundamentals/filter-expressions) and a boost score. Results that match the filter expression will be boosted according to the given score.

**Example**

Assuming you want to run a promotion on Nike products in your online store. The following *Filter boost* will boost Nike products by a score of 0.8.

| Filter         | Score |
| -------------- | ----- |
| brand = "nike" | 0.8   |

But filter boosts aren't limited to pre-defined values like "nike" in the example above. The filter expression can reference dynamic parameters passed into the search.

To personalize results, you can pass information about the user, such as brand affinity, into the search query and improve the search results based on that data.

```
{
    "variables": {
        "q": "headphones",
        "brandAffinity": "Adidas"
    }
}
```

In the above query example, we are passing a variable called "brandAffinity" to the search query. The variable can be referenced in the filter boost like so:

| Filter                | Score |
| --------------------- | ----- |
| brand = brandAffinity | 0.7   |

### Range boost <a href="#range-boost" id="range-boost"></a>

Boost results that fall within a specific numeric range. Boosting is applied linearly between the start and the end point. Use range boosts to boost highly rated products, popular products or inventory that needs to be sold.

**Example**

Assume that you have a rating field that ranges between 0-5 and the values can be decimal values (not just whole numbers). You want to boost values between 2-4 in a linear manner, where 2 receives the smallest boost and 4 (and above) the maximum boost. Ratings between 0 and 2 will receive no boost.

The configuration for this would look as follows, where the score boost of 0.4 is the maximum boost applied to values of 4 and above.

| Field  | Start | End | Score |
| ------ | ----- | --- | ----- |
| rating | 2     | 4   | 0.4   |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.search.io/documentation/fundamentals/search-settings/ranking-adjustments.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
