Search API
The Search API provides hybrid search capabilities combining vector similarity (pgvector) and full-text search (tsvector) across MRT example chunks.Hybrid Search Test
Search across MRT example chunks using hybrid search combining vector similarity and full-text search.Request Body
Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
document_set_key | string | Yes | - | Connector data ID for scoping search |
query | string | Yes | - | Search query text (non-empty) |
limit | integer | No | 20 | Max results (1-100) |
vector_k | integer | No | 50 | Vector candidates (10-200) |
document_filters | array | No | - | Document names to filter (wildcard support) |
only_text_search | boolean | No | false | Skip vector search if true |
Request Example
Python Example
Response
Response Fields
| Field | Type | Description |
|---|---|---|
query | string | Search query executed |
document_set_key | string | Document set key used |
total_results | integer | Number of results |
search_type | string | ”hybrid” or “text” |
chunks | array | Result chunks |
chunks[].id | string | Chunk identifier |
chunks[].content | string | Chunk text content |
chunks[].score | number | Relevance score (0-1) |
chunks[].rank | integer | Result ranking |
chunks[].document_name | string | Source document name |
chunks[].document_type | string | Document type |
chunks[].section_name | string | Section within document |
chunks[].page_number | integer | Page number (if available) |
Status Codes
- 200 OK: Search completed successfully
- 400 Bad Request: Invalid request parameters (empty query, invalid limits)
- 401 Unauthorized: Missing or invalid Bearer token
- 500 Internal Server Error: Search operation failed
Search Types
The API supports two search modes: Hybrid Search (default):- Combines vector similarity (semantic search) and full-text search
- Best for finding contextually relevant content
- Slower but more accurate
- Uses only full-text search (tsvector)
- Faster but less semantic understanding
- Set
only_text_search: trueto use
Document Filtering
Filter results by document name using wildcard patterns:Relevance Scoring
Scores range from 0 to 1:- 0.9+: Highly relevant
- 0.7-0.9: Relevant
- 0.5-0.7: Somewhat relevant
- <0.5: Low relevance
Search Status
Get search service status and configuration (no authentication required).Request Example
Response
Response Fields
| Field | Type | Description |
|---|---|---|
status | string | Service status |
search_index | string | Index name |
search_types | array | Available search types |
features | object | Enabled features |
defaults | object | Default parameters |
Status Codes
- 200 OK: Service is healthy
- 503 Service Unavailable: Search service is down