Basic Usage

Searches for the presence of a specific term.

SELECT description, rating, category
FROM mock_items
WHERE description @@@ 'shoes';

If the provided term can be tokenized further, the tokenization is automatically applied at search time using the same tokenizer as the prefixed field.

Multiple Terms

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

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 ORed together by default.

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.

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

Special Characters

The special characters + , ^, `, :, {, }, ", [, ], (, ), <, >,~, !, \\, \*, and SPACE must be escaped by a \ inside the query term.