Skip to content

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.

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 your search to specific fields, document content, or both. When using FIND ALL without SCOPE, VQL uses SCOPE PROPERTIES by default.

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.

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.
  • 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.

You can use the following functions and query target options in the FIND ALL clause. For full technical details, see the VQL Functions & Options reference.

These options control which fields or content are searched.

NameGoalAPI Version
SCOPE ALLSearch all fields and document content.v8.0+
SCOPE CONTENTSearch document content only.v8.0+
SCOPE {fields}Search one specific document field or up to 25 object fields.v15.0+
SCOPE PROPERTIESSearch all picklists and text-based fields (default scope).v8.0+

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

NameGoalAPI Version
DISTANCEEnable fuzzy search with an edit distance of up to 2.v26.1+

The following are examples of queries using FIND ALL.

Query: Find Documents Containing All Search Terms

Section link for 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):

SELECT id, name__v
FROM documents
FIND ALL ('cdc poutine')
{
    "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

Section link for Query: Scope a FIND ALL Search to a Field

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

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

Query: Fuzzy Matching with DISTANCE

Section link for Query: Fuzzy Matching with DISTANCE

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

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