# String Searches

These instructions apply to the legacy Admin Console.

## CLQL String Searches

Using **strings** is the simplest way to filter your log messages. Here are some basics:

* By default, a string search matches an _entire_ field value exactly.
  * For example, if a field value is `Get User Details`, then searching for `Get` alone **won’t** match.
* Use `*` to do partial matches.
  * `Get*` will match any field value starting with “Get” (e.g., “Get User Details”).
* You don’t need quotes unless your search string has spaces.
  * `Get User` (without quotes) will match any message with _exactly_ “Get” and _exactly_ “User” somewhere.
  * `"Get User"` (in quotes) will match the entire phrase “Get User” with the space included.

## Examples

1.  **Find all messages that match**:

    * A field value of exactly `error`
    * A field value starting with `salesforce` (`salesforce*`)
    * A field value matching the pattern: `"Get * Details"`

    ```graphql
    error salesforce* "Get * Details"
    ```
2.  **Use `not`** to exclude results:

    * Messages that start with `error` or `salesforce`
    * But **don’t** contain `"Get User"`

    ```graphql
    error* salesforce* not "Get User"
    ```
3.  **Chain multiple terms** with `not` to further refine results:

    * Messages that start with `error` and contain `2024-12-20T15`
    * But **don’t** contain `"Not Found"` or `"Validation Failed"`

    ```graphql
    error* 2024-12-20T15* not "Not Found" not "Validation Failed"
    ```
