---
title: Overview
noindex: true
---

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

Compound queries combine multiple other queries. For instance, the following query looks for documents containing either the term `running` or `shoes` and boosts the relevance of documents matching `shoes`.

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

<div className="mt-8" />

Compound query functions are composable, which allows for arbitrarily fine-grained queries.
