search¶
Description¶
Return true if the for
text is matched in the input string in
(case-insensitive).
All the for
arguments must individually match, but ordering between them doesn’t matter.
See also contains
Return type¶
bool
Domain¶
This is a scalar function (calculates a single output value for a single input row.)
Categories¶
Usage¶
search(@in, for_1, for_2, ...)
Argument |
Type |
Optional |
Repeatable |
Restrictions |
---|---|---|---|---|
@in |
dataset |
no |
no |
dataset |
for |
string |
no |
yes |
constant |
search(in, for_1, for_2, ...)
Argument |
Type |
Optional |
Repeatable |
Restrictions |
---|---|---|---|---|
in |
searchable |
no |
no |
none |
for |
string |
no |
yes |
constant |
Examples¶
filter search(log, "ERROR")
Pass through all observations where field log
contains the string ERROR
.
filter search("foo bar baz", "FOO B", "baz", "aR")
This will return true, because each of the sub-strings "FOO B"
, "baz"
and "aR"
match, ignoring case, and ignoring relative ordering. Note that the match "FOO B"
and "baz"
overlap each other.