---
title: Term Set
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>

<Note>
  BM25 scoring is not enabled for term set queries. As a result, the scores
  returned may not be accurate. This behavior reflects the underlying
  implementation in Tantivy.
</Note>

## Basic Usage

Matches documents containing any term from a specified set.

<CodeGroup>
```sql Function Syntax
SELECT description, rating, category
FROM mock_items
WHERE id @@@ paradedb.term_set(
	terms => ARRAY[
		paradedb.term('description', 'shoes'),
		paradedb.term('description', 'novel')
	]
);
```
```sql JSON Syntax
SELECT description, rating, category
FROM mock_items
WHERE id @@@
'{
    "term_set": {
        "terms": [
            {"field": "description", "value": "shoes"},
            {"field": "description", "value": "novel"}
        ]
    }
}'::jsonb ORDER BY id;
```
</CodeGroup>

<div className="mt-8" />

<ParamField body="terms" required>
  An `ARRAY` of `paradedb.term` query objects.
</ParamField>
