Skip to main content
Legacy Docs: This page describes our legacy API. It will be deprecated in a future version. Please use the v2 API where possible.

Basic Usage

Searches for documents containing a phrase.
SELECT description, rating, category
FROM mock_items
WHERE id @@@ paradedb.phrase('description', ARRAY['running', 'shoes']);
field
required
Specifies the field within the document to search for the term.
phrases
required
An ARRAY of words that form the search phrase. These words must appear in the specified order within the document for a match to occur, although some flexibility is allowed based on the slop parameter.
slop
default:0
A slop of 0 requires the terms to appear exactly as they are in the phrase and adjacent to each other. Higher slop values allow for more distance between the terms.
Setting slop equal to n allows n terms to come in between the terms in the phrase.
SELECT description, rating, category
FROM mock_items
WHERE id @@@ paradedb.phrase('description', ARRAY['sleek', 'shoes'], slop => 1);