Skip to main content
Version: v3.x

Filter by Text

Introduction

The _like, _nlike, _ilike, _nilike, _similar, _nsimilar, _regex, _nregex, _iregex, _niregex operators are used for pattern matching on string/text fields.

_like

Fetch a list of articles whose titles contain the word “amet”:

_ilike

This query will return all users whose name contains the string "john", regardless of case.

_nilike

This query would return all users whose name does not contain the string "John".

Note

_like is case-sensitive. Use _ilike for case-insensitive search.

_similar

Fetch a list of authors whose names begin with A or C:

_nsimilar

Fetch a list of authors whose names do not begin with A or C:

Note

_similar and _nsimilar are case-sensitive.

_regex

Fetch a list of articles whose titles match the regex [ae]met:

_iregex

This query will return all users whose name matches the regular expression /^joh?n$/i, which matches "John" and "Jon".

_nregex

The _nregex operator in this GraphQL query is a negated regular expression filter that matches all users whose names do not start with the letter "J".

Note

_regex is case-sensitive. Use _iregex for case-insensitive search.

Note

regex operators are supported in v2.0.0 and above