v38

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-31148285.5 KB

Explain a query plan.

post/v2/namespaces/{namespace}/explain_query

Path parameters

namespacestring required

The name of the namespace.

Request body

{"stackTrail":"paths:/v2/namespaces/{namespace}/explain_query:post:requestBody:content:application/json:schema:allOf:properties:rank_by","oasType":"schema","type":"unknown","description":"How to rank the documents in the namespace.\n","extensionFields":{"x-stainless-any":true}}
top_kinteger

The number of results to return.

{"stackTrail":"paths:/v2/namespaces/{namespace}/explain_query:post:requestBody:content:application/json:schema:allOf:properties:filters","oasType":"schema","type":"unknown","description":"Exact filters for attributes to refine search results for. Think of it as a SQL WHERE clause.\n","extensionFields":{"x-stainless-any":true}}
exclude_attributesstring[]

List of attribute names to exclude from the response. All other attributes will be included in the response.

aggregate_byobject

Aggregations to compute over all documents in the namespace that match the filters.

compute_attributesobject

Computes additional values on documents returned by a query. Each key is the name of the computed attribute; each value is an expression describing how to compute it.

Response

The query plan explanation.

plan_textstring

The textual representation of the query plan.