Docs
Knowledge Search
Search a bucket through the v2 pipeline and receive answer-ready context with citations.
Endpoint
bashPOST /v2/buckets/{bucket_id}/searchUse this endpoint for new search integrations. Clients provide the question, metadata filters, and optional rerank or instruction settings; Schift handles embedding, hybrid retrieval, reranking, context packing, and citation shaping on the server.
| Parameter | Type | Default | Description |
|---|---|---|---|
query | string | -- | Natural-language question or search query |
top_k | integer | 8 | Candidate count before context packing |
context_budget | integer | -- | Maximum context budget returned to the caller |
filters | object | -- | Metadata filters from uploaded documents |
options.rerank.enabled | boolean | false | Enable server-side reranking |
options.rerank.top_k | integer | top_k | Candidate count retained after reranking |
options.instructions.task | string | -- | Task hint for result shaping and context selection |
Example
bashcurl -X POST https://api.schift.io/v2/buckets/{bucket_id}/search \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $SCHIFT_API_KEY" \
-d '{
"query": "How do I migrate embedding models?",
"filters": {"doc_type": "guide"},
"top_k": 8,
"context_budget": 12000,
"options": {
"rerank": {"enabled": true, "top_k": 5},
"instructions": {"task": "answer with concise cited evidence"}
}
}'Compatibility
POST /v1/query, POST /v1/collections/{name}/search, and POST /v1/buckets/{bucket_id}/search are compatibility surfaces for older clients. Do not introduce them in new product docs unless you are writing migration notes.