Skip to content

find / text - Free text search

The find operator will search for documents where a given keypath contains a given string. It represents a very shorthand combination of filter and contains.

Syntax

(find|text) <free-text-string> in <keypath>

Example - Finding an AWS availability zone in a message field

Consider the following documents:

{
    "msg": "eu-west-1a instance deployed"
},
{
    "msg": "eu-west-1b instance deployed"
},
{
    "msg": "eu-west-1c instance deployed"
}

If we do not wish to parse this value, we can simply use find to search for the value that interests us.

find 'eu-west-1a' in msg

This will return the following document:

{
    "msg": "eu-west-1a instance deployed"
}

Example - Finding silent error logs

Some logs may contain error messages, but due to how they are parsed, they are not appearing with the correct severity. find can be used to detect those logs.

find 'error' in msg

This will return all documents that contain the value error anywhere in the msg field.