> For the complete documentation index, see [llms.txt](https://docs.contextual.io/documentation-and-resources/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.contextual.io/documentation-and-resources/tenants/tenant-logs/contextual-log-query-language-clql/string-searches.md).

# String Searches

## 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"
   ```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.contextual.io/documentation-and-resources/tenants/tenant-logs/contextual-log-query-language-clql/string-searches.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
