Skip to content

search

Searches character data (text) in specified columns.

search( <search_data>, <query>, <analyzer> )

The data you want to search.

A string that contains one or more search terms. This argument must be a literal string; column names are not supported. Specify one pair of single quotes around the entire string.

The analyzer to use for the search. This argument must be one of the strings listed below:

  • log

The default value is log.

Returns a boolean.

  • The value is TRUE if any <query> tokens are found in <search_data>.
  • Returns NULL if either of these arguments is NULL.
  • Otherwise, returns FALSE.
VALUES ('foo bar'), ('foobar'), ('bar baz'), ('') SELECT *, search($0, query => 'foo');
+---------+----------------------------+
| $0 | search($0, query => 'foo') |
+---------+----------------------------+
| foo bar | true |
| foobar | false |
| bar baz | false |
| | false |
+---------+----------------------------+
ScopeDB Logo ScopeDB
© 2025 ScopeDB. All rights reserved.