DeepFellow DOCS

Search a vector store for relevant chunks based on a query and file attributes filter.

POST
/v1/vector_stores/{vector_store_id}/search

Search a vector store for relevant text chunks based on a query and optional file attributes filter.

Generate embeddings for the search query using VectorStoreEmbeddingService, find the most similar chunks in the specified vector store, and rank them by relevance score. Additionally, apply filters to narrow results before returning them as part of a paginated response.

Needs user bearer token in authorization header.

Authorization

headerAuthorizationBearer <token>

Path Parameters

vector_store_id*string

The ID of the vector store to delete.

Match^[0-9a-fA-F]{24}$

Header Parameters

OpenAI-Organization?|

Organization Id from OpenAi compatible endpoint. Required to organization access or project access (with OpenAI-Project header) when logged as User or Admin User.

OpenAI-Project?|

Project Id from OpenAi compatible endpoint. Required to project access for organization api key or User / Admin User access with OpenAI-Organization

Request Body

application/json
  1. body

Request body for searching a vector store.

query*|array<string>

A query string or array of strings for a search

filters?||

A filter to apply based on file attributes

max_num_results?|

The maximum number of results to return. This number should be between 1 and 50 inclusive

ranking_options?|

Ranking options for search

rewrite_query?|

Whether to rewrite the natural language query for vector search

Response Body

Successful Response

application/json
  1. response

Response from vector store search endpoint.

object?string

Object type identifier

Default"vector_store.search_results.page"
search_query*|array<string>

A query string or array of strings for a search

data*array<>

List of search results

has_more*boolean

Whether there are more results available

next_page?|

Token for fetching the next page of results

Example Request
curl -X POST 'https://deepfellow-server-host/v1/vector_stores/5eb7cf5a86d9755df3a6c593/search' \  -H 'Content-Type: application/json' \  -d '{  "query": "string"}'
Example Response
{  "object": "vector_store.search_results.page",  "search_query": "string",  "data": [    {      "file_id": "5eb7cf5a86d9755df3a6c593",      "filename": "string",      "score": 0,      "attributes": {},      "content": [        {          "text": "string",          "type": "text",          "offset": 0,          "metadata": {}        }      ]    }  ],  "has_more": true,  "next_page": "string"}

We use cookies on our website. We use them to ensure proper functioning of the site and, if you agree, for purposes such as analytics, marketing, and targeting ads.