**Source URL:** https://limited.veevavault.dev/qualityone/vql/clauses/find-all

# FIND ALL

Use `FIND ALL` to search Vault objects and documents when every term in the search phrase must match. Unlike `FIND`, which can return results matching any term, `FIND ALL` treats every token generated from the search phrase as a required term (`AND` logic). This mirrors the *All of these Words* option in the [Vault Advanced Search UI](https://platform.veevavault.help/en/gr/442).

`FIND ALL` is especially useful for languages without natural word spacing, such as Chinese, where a single multi-character term is tokenized into multiple pieces. `FIND ALL` ensures results contain the entire concept rather than any individual piece.

*   `FIND ALL` is available in Vault API v26.3+.
*   `FIND ALL` supports documents and Vault objects with a `standard` `data_store`.
*   `FIND ALL` is not supported on raw Vault objects or in attachment subqueries.
*   `FIND ALL` cannot be combined with `FIND` in the same query.

You can [scope](/qualityone/vql/functions-options/find-scopes-distance) your search to specific fields, document content, or both. When using `FIND ALL` without `SCOPE`, VQL uses [SCOPE PROPERTIES](/qualityone/vql/functions-options/find-scopes-distance/scope-properties) by default.

<Aside>
When precise matching is absolutely critical, we recommend using the `WHERE` clause instead of `FIND ALL`. `FIND ALL` is more appropriate for interactive applications.
</Aside>

## Syntax

```sql
SELECT {fields}
FROM {query target}
FIND ALL ('{search phrase}')
```

The `FIND ALL` search phrase must be enclosed in single quotation marks. The entire `FIND ALL` statement (search phrase and scopes) must be enclosed in parentheses.

The maximum search term length is 250 characters. The minimum search term length is 1 character.

The search phrase is not case sensitive.

## Constraints

`FIND ALL` enforces the following restrictions:

*   **No logical operators**: Because `FIND ALL` implies a universal `AND` across all terms, the `AND`, `OR`, and `NOT` operators are not permitted in the search phrase.
    *   `NOT` caveat: You can use `NOT` only to negate the entire search phrase. For example, Vault supports `FIND ALL (NOT 'broken pills')` to find all results without "broken" and without "pills".
*   **Wildcards**: Wildcards are supported, subject to the [standard wildcard rules](/qualityone/vql/references/search-specifications/wildcards-id-patterns).
*   **Fuzzy matching**: The `DISTANCE` option is supported when `SCOPE` is limited to 5 fields or fewer and 3 or fewer search terms use a non-zero distance.
*   **Stemming**: Stemming remains active for all tokens.
*   The same token limits that apply to `FIND` apply to `FIND ALL`.

## Functions & Options

You can use the following functions and query target options in the `FIND ALL` clause. For full technical details, see the [VQL Functions & Options](/qualityone/vql/functions-options) reference.

### Refining Search Scope

These options control which fields or content are searched.

| Name | Goal | API Version |
| --- | --- | --- |
| [`SCOPE ALL`](/qualityone/vql/functions-options/find-scopes-distance/scope-all) | Search all fields and document content. | v8.0+ |
| [`SCOPE CONTENT`](/qualityone/vql/functions-options/find-scopes-distance/scope-content) | Search document content only. | v8.0+ |
| [`SCOPE {fields}`](/qualityone/vql/functions-options/find-scopes-distance/scope-fields) | Search one specific document field or up to 25 object fields. | v15.0+ |
| [`SCOPE PROPERTIES`](/qualityone/vql/functions-options/find-scopes-distance/scope-properties) | Search all picklists and text-based fields (default scope). | v8.0+ |

### Advanced Matching

These functions and options provide more granular control over search results.

| Name | Goal | API Version |
| --- | --- | --- |
| [`DISTANCE`](/qualityone/vql/functions-options/find-scopes-distance/distance) | Enable fuzzy search with an edit distance of up to 2. | v26.1+ |

## Query Examples

The following are examples of queries using `FIND ALL`.

### Query: Find Documents Containing All Search Terms

The following query returns the latest version of all documents that contain both *cdc* and *poutine* (case insensitive):

```sql
SELECT id, name__v
FROM documents
FIND ALL ('cdc poutine')
```

### Response

```json
{
    "responseStatus": "SUCCESS",
    "responseDetails": {
        "find": "('cdc poutine')",
        "pagesize": 1000,
        "pageoffset": 0,
        "size": 1,
        "total": 1
    },
    "data": [
        {
            "id": 110,
            "name__v": "CDC reports on poutine overconsumption"
        }
    ]
}
```

### Query: Scope a FIND ALL Search to a Field

To use `FIND ALL` within a certain field, use `SCOPE {fields}`:

```sql
SELECT id, name__v
FROM documents
FIND ALL ('cholesterol' SCOPE name__v)
```

### Query: Fuzzy Matching with DISTANCE

Use `DISTANCE` with `SCOPE {fields}` to allow minor misspellings. The following query matches *cholesterol* despite the misspelled term:

```sql
SELECT id, name__v
FROM documents
FIND ALL ('cholestrol' DISTANCE [1] SCOPE name__v)
```

---

**Previous:** [FIND](/qualityone/vql/clauses/find)  
**Next:** [ORDER BY](/qualityone/vql/clauses/order-by)