---
title: Boolean
---

Query strings can be combined using SQL `AND` and `OR` operators. To combine query builder functions, see the
[boolean query](/documentation/advanced/compound/boolean).

## Multiple Terms

`AND` and `OR` can be used to combine and filter multiple terms.

```sql
SELECT description, rating, category
FROM mock_items
WHERE description @@@ 'keyboard' OR category @@@ 'toy';
```

If multiple terms are passed into the same query string, they are `OR`ed together by default.

```sql
SELECT description, rating, category
FROM mock_items
WHERE description @@@ 'keyboard headphones';
```

## Not Term

`-` omits results that contain a specific term. The following query finds documents that match
`shoes` or `running` but not `white`.

```sql
SELECT description, rating, category
FROM mock_items
WHERE description @@@ '(shoes running -white)';
```
