Skip to main content

Search a pipeline

POST 

/pipelines/:pipeline_id/search

Runs one similarity, maximal marginal relevance (MMR), full-text, hybrid or history search on a pipeline and returns the matching fragments as a JSON array, without the list envelope. The request body names the search text, the reader's classifications, the search type with the parameters of the type, an optional path pattern and an optional metadata filter. Each search type reads the search index named in params or the pipeline's default index of the required kind, and a search without path covers only the documents without a path.

Permissions. Read and execute on the pipeline, and a classification allow-list that covers every classification that the request names.

Search requests describes every field, the search types, the response and the errors.

Request​

Responses​

The body is an array of fragments, which can be empty. Similarity and MMR results are ordered by ascending distance, full-text and hybrid results by descending score, and history results by document version, newest first.