> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paradedb.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Boost

<Danger>
  **Legacy Docs:** This page describes our legacy API. It will be deprecated in
  a future version. Please use the [v2 API](/) where possible.
</Danger>

## Basic Usage

A boost query wraps around another query to amplify its scoring impact, without altering the set of matched documents.

<CodeGroup>
  ```sql Function Syntax theme={null}
  SELECT description, rating, category, pdb.score(id)
  FROM mock_items
  WHERE id @@@ paradedb.boolean(
    should => ARRAY[
      paradedb.term('description', 'shoes'),
      paradedb.boost(2.0, paradedb.term('description', 'running'))
    ]
  );
  ```

  ```sql JSON Syntax theme={null}
  SELECT description, rating, category, pdb.score(id)
  FROM mock_items
  WHERE id @@@
  '{
      "boolean": {
          "should": [
              {"term": {"field": "description", "value": "shoes"}},
              {"boost": {"factor": 2.0, "query": {"term": {"field": "description", "value": "running"}}}}
          ]
      }
  }'::jsonb;
  ```
</CodeGroup>

<div className="mt-8" />

<ParamField body="factor" required>
  The factor by which to multiply the score of each result.
</ParamField>

<ParamField body="query" required>
  The query to perform.
</ParamField>
