Search a pipeline
POST/pipelines/:pipeline_id/search
Runs one similarity, maximal marginal relevance (MMR) or full-text 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 and an optional metadata filter.
Permissions. Read and execute on the pipeline.
Search requests describes every field, the search types, the response and the errors.
Request
Responses
- 200
- 400
- 401
- 404
- 422
- 500
- 501
The body is an array of fragments ordered by score, which can be empty.
The search names an embedding model that the pipeline does not use, or the pipeline has no embedding model (Vector embedding not found). The request sets type to query (Invalid search type or parameters), or the filter does not match the pipeline's metadata schema (Schema error).
The authentication headers are missing or invalid, or the API key is inactive or expired. Errors lists the messages.
No pipeline with this identifier exists or the key lacks read and execute permission on the pipeline (Pipeline not found), or search_type is 1 or 3 and a named classification is not defined in the pipeline (Classification not found).
The body does not match the request schema, for example a missing required field or an unknown type or distance_strategy value. The body is plain text.
The embedding model could not convert the query into a vector, the query language could not be detected, or the database rejected the query (Internal error or a database error message).
The request sets type to hybrid or history, or sets type to search on a pipeline without full-text search (Hybrid placeholder is not implemented yet, History placeholder is not implemented yet or Full text search is not enabled for this pipeline).