Skip to main content
search_everything finds records in the Provider Pool by what their text says: calls where a customer raised pricing, issues about an SSO login loop. search_available_data finds where data lives, the tables and columns. Use that first when you do not yet know the table. Use search_everything when the question is about the contents of records. It searches only the Provider Pool, and only text fields a Provider has flagged for this search. It returns one row per matching source record, never one per passage. A record a Provider Policy hides from you is left out, and its text never appears in a snippet. A session that cannot query the Provider Pool does not see its records here. An empty result is not proof that nothing matches. A missing model policy, a policy that admits no embedding model for this search, or an index that is missing or still building all return no rows, the same as a search that found nothing. Try the question again later, or use search_available_data and read the table directly. Each matching record is read again from its source table before it is returned. When one source table takes too long to read, its records are left out of that search, and records from the other tables still return. When no source table can be read in time, the search fails with DEADLINE_EXCEEDED and the error code QL-TO-004 (ROW_SEARCH_REREAD_TIMEOUT). The message names the time limit. Run the search again. If it fails again, narrow the scope to fewer tables, such as one Provider. Preview a Plot answers it as HTTP 504 with the same code and message:
The function runs only in interactive queries, such as Preview a Plot. A Plot cannot call it: saving one records an error, and the Plot cannot publish until the call is removed. Search, then write the Plot’s SQL against the source table.

Arguments

The function takes up to three arguments, by position only: search_everything(query [, scope [, limit]]). Named arguments (query => ...) are refused. A scope such as providers.jiracloud.* keeps the search to one Provider. providers.jiracloud.issues.body keeps it to one field. The Workspace Pool is not searched; a scope starting with workspace is refused. Arguments the function cannot search are refused before anything runs: a scope outside the Provider Pool, a limit outside 1 to 100 or not a whole number, an empty query, or a query or scope that is not a text literal. The refusal is INVALID_ARGUMENT with the error code QL-PL-018, as in search_available_data, and its message names the argument and what to use instead. Preview a Plot answers it as HTTP 400 with the same code and message:

Results

Each row is one source record, best passage first. score is that passage’s similarity, from 0 to 1. It is not a sum across passages, so a long record does not outrank a short one that matches more closely. matched_chunks is how many of the record’s passages were among the candidates and still match the text stored for them. A passage matches when the record, read now, still yields the same passage. Some fields are searched with context from the same record, such as an issue’s title before its body, a call transcript is searched as windows of speaker turns, and a Notion page is searched as its blocks under its title. A record whose field, context or turns changed after it was indexed is left out until the index catches up. The snippet is the beginning of the best passage, not the whole record. span names the rest. Read the full record from the source table.

Join back

row_key is a JSON object of the source table’s key columns. A single text key joins like this:
row_key is JSON text. json_get_str reads a text key; json_get_int reads a numeric one. Use the names inside row_key. A record with more than one key column matches each of them. The join reads the source table under the same Provider Policies as any other query, so a record the search omitted stays omitted.