wildfind / wildtext
Description
The wildfind
command searches for a given string across all keypaths in every document in the working set. It is useful when you don’t know which field contains the target value.
The alias wildtext
behaves identically.
Note
wildfind
is significantly slower than find
or text
, since it must inspect every field in every document. Use find
when the keypath is known for better performance.
Syntax
Example
Use case: Locate an IP address anywhere in a document
When you’re unsure which field contains a specific value (such as an IP address), wildfind
can search across all keypaths and return any document containing that value.
Example data
{ "msg": "User with IP 10.10.10.10 logged in", "msg_field": "7.8.4.120 logged in" },
{ "message": "User with IP 192.168.0.42 changed password", "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" }
Example query
Example output
{ "txt_msg": "User with IP 7.8.4.120 accessed page" },
{ "body": "User with IP 7.8.4.120 logged out" }
The wildfind
command scans every field of each document and returns all those containing the search string. In this example, all documents include the IP address, so all are returned.
Tip
Use find
or text
when you know the keypath (e.g. find '7.8.4.120' in msg
) for faster performance.