Search

Search

Searches the documents in a namespace.

Set multiturn: true to enable multi-turn mode, which returns a session_id and may return clarification_needed status when the system needs more information.

Set stream: true to receive results as server-sent events; see SearchStreamEvent for the event shape. The stream closes after either a session_result or error event.

post/v1/namespaces/{namespace}/search

Request body

objectivestring required

One sentence describing what you are looking for.

contextstring required

Additional context that helps the search system understand your intent. For example, relevant terminology, constraints, or prior knowledge.

streamboolean

Whether to stream the response as server-sent events.

include_attributesboolean

Whether to include document attributes in search results.

multiturnboolean

Enable multi-turn mode. When true, the response includes a session_id and may return clarification_needed status. When false (default), the search always completes in a single request.

Response

Successful response. When stream is false (default), returns JSON. When stream is true, returns text/event-stream.

session_idstring required

Unique identifier for this search session.

status'completed' | 'clarification_needed' | 'failed' required
documents_scannedinteger

Number of documents scanned during the search.

queries_executedinteger

Number of queries executed during the search.

synthesisstring required

Synthesized summary of all findings.

Changes

Changed in 5 of the 8 revisions of this API.8319

  • eee9850f474611See the full diff
    • added SearchStatusEvent SearchSessionResultEvent SearchErrorEvent to the response body oneOf list for the response status 200

      response-body-one-of-added

    • added response discriminator for the response status 200

      response-body-discriminator-added

    • the response property session_id became required for the status 200

      response-property-became-required

  • 6cb1ae65bb7854See the full diff
    • added the new required request property context

      new-required-request-property

    • added the new required request property objective

      new-required-request-property

    • removed SearchNewSessionRequest SearchContinuationRequest from the request body oneOf list

      request-body-one-of-removed

    • the request's body type/format changed from / to object/

      request-body-type-changed

    • the response property session_id became optional for the status 200

      response-property-became-optional

    • added the new optional request property filters

      new-optional-request-property

    • added the new optional request property include_attributes

      new-optional-request-property

    • added the new optional request property multiturn

      new-optional-request-property

    • added the new optional request property stream

      new-optional-request-property

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the new optional request property oneOf[subschema #1: New Session]/include_attributes

      new-optional-request-property

    • added the new optional request property oneOf[subschema #2: Continue Session]/include_attributes

      new-optional-request-property

    • added subschema #12: Glob subschema #13: Case-Insensitive Glob to the oneOf[subschema #1: New Session]/filters/oneOf[subschema #3: Field Condition]/additionalProperties/ request property oneOf list

      request-property-one-of-added

    • added the media type text/event-stream for the response with the status 200

      response-media-type-added

    • added the non-success response with the status 400

      response-non-success-status-added

    • added the non-success response with the status 401

      response-non-success-status-added

    • added the non-success response with the status 404

      response-non-success-status-added

    • added the optional property documents_scanned to the response with the 200 status

      response-optional-property-added

    • added the optional property queries_executed to the response with the 200 status

      response-optional-property-added

    • added the optional property results/items/attributes to the response with the 200 status

      response-optional-property-added

    • removed the expired enum value from the status response property for the response status 200

      response-property-enum-value-removed

    • removed the pending enum value from the status response property for the response status 200

      response-property-enum-value-removed

    • removed the running enum value from the status response property for the response status 200

      response-property-enum-value-removed

    • added the new required request property oneOf[subschema #1: New Session]/context

      new-required-request-property

    • added the new required request property oneOf[subschema #1: New Session]/objective

      new-required-request-property

    • removed the request property oneOf[subschema #1: New Session]/high_level_goal

      request-property-removed

    • removed the request property oneOf[subschema #1: New Session]/max_results

      request-property-removed

    • removed the request property oneOf[subschema #1: New Session]/search_query

      request-property-removed