---
title: Overview
---

In addition to query strings, [`JSONB` query objects](#query-objects) and [query builder functions](#query-builder-functions)
can be used to compose various types of more complex queries.

If you are familiar with Elasticsearch's API, you may notice that the available query types are similar to those found in
Elastic's query DSL. This is intentional — ParadeDB uses the same terminology as Elasticsearch for its query types.

## Basic Usage

The left-hand side of `@@@` must be the [key field](/documentation/indexing/create_index#choosing-a-key-field)
and the right-hand side should be either a JSON object or query builder function. For instance, the following code block
executes a [match query](/documentation/advanced/full-text/match).

<CodeGroup>
```sql Function Syntax
SELECT description, rating, category
FROM mock_items
WHERE id @@@ paradedb.match('description', 'running shoes');
```

```sql JSON Syntax
SELECT description, rating, category
FROM mock_items
WHERE id @@@ '{"match": {"field": "description", "value": "running shoes"}}'::jsonb;
```

</CodeGroup>

The JSON object and query builder function syntaxes are interchangeable, giving you the freedom to decide what's easier for your application to write.

<Note>
  The JSON query object must be explicitly cast to `JSONB` using `::jsonb`.
</Note>

<Note>
JSON syntax queries can accept datetime values as strings. To disambiguate
these from string values, you should set `"is_datetime": true` in the query
parameters.

```sql
SELECT id, description, created_at FROM mock_items WHERE mock_items @@@ '{
    "range": {
        "field": "created_at",
        "lower_bound": {"included": "2023-05-01T08:12:34Z"},
        "upper_bound": null,
        "is_datetime": true
    }
}'::jsonb
ORDER BY id;
```

</Note>
