Skip to content

wildfind / wildtext - Find a string in an entire document

When the keypath to search is unknown, wildfind is extremely useful. This will search for a given string in every single keypath in all documents in your working set.

NOTE: The performance of this operator is worse than when using the find/text operator. Prefer using those operators when you know the keypath to search for.

Syntax

(wildfind/wildtext) <string>

Example - Finding an IP address

Consider the following documents:

{
    "msg": "User with IP 7.8.4.120 logged in",
    "msg_field": "7.8.4.120 logged in"
},
{
    "message": "User with IP 7.8.4.120 changed password in",
    "txt": "7.8.4.120 updated profile picture"
},
{
    "txt_msg": "User with IP 7.8.4.120 accessed page",
},
{
    "body": "User with IP 7.8.4.120 logged out",
}

Searching for each of these individual fields will prove complex and inconsistent. Rather, using wildfind will speed this up:

wildfind '7.8.4.120'

This will return all documents, because this IP address appears in all of them.