Search
Managed hybrid retrieval primitives backed by D1 metadata, lexical FTS recall, optional Vectorize sync, and Workers AI embeddings or rerank. SaaSignal owns the retrieval surface, but your application still owns source-of-truth documents and business logic.
Create Search Index
Create a managed search index backed by D1 metadata, FTS recall, and optional Vectorize namespaces.
curl -X POST https://api.saasignal.saastemly.com/infra/decisioning/search/indexes \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{"name":"example","dimensions":1}'
{ "status": "ok" }
const index = await ss.infra.decisioning.search.createIndex({ name: 'products', dimensions: 1024, mode: 'hybrid', embedding_model: 'workers-ai:bge-m3' })
- Open Dashboard → API Console and select your project
- Choose POST /infra/decisioning/search/indexes from the route list
- Fill in the JSON body or Storage references, then send the request and inspect the response directly in the console
name requireddescriptionmetriccosine, dot-product, euclideandimensions requiredmodelexical, semantic, hybridembedding_modelrerank_modelvector_namespacemetadata_schemaList Search Indexes
List search indexes for the active project.
curl https://api.saasignal.saastemly.com/infra/decisioning/search/indexes \
-H "Authorization: Bearer sk_live_..."
{ "status": "ok" }
const { indexes } = await ss.infra.decisioning.search.listIndexes()
- Open Dashboard → API Console and select your project
- Choose GET /infra/decisioning/search/indexes from the route list
- Fill in the JSON body or Storage references, then send the request and inspect the response directly in the console
Get Search Index
Get a search index definition and rebuild metadata.
curl https://api.saasignal.saastemly.com/infra/decisioning/search/indexes/{index_id} \
-H "Authorization: Bearer sk_live_..."
{ "status": "ok" }
const index = await ss.infra.decisioning.search.getIndex('sidx_123')
- Open Dashboard → API Console and select your project
- Choose GET /infra/decisioning/search/indexes/{index_id} from the route list
- Fill in the JSON body or Storage references, then send the request and inspect the response directly in the console
index_id requiredUpdate Search Index
Update mutable search index metadata.
curl -X PATCH https://api.saasignal.saastemly.com/infra/decisioning/search/indexes/{index_id} \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{}'
{ "status": "ok" }
const index = await ss.infra.decisioning.search.updateIndex('sidx_123', { description: 'Hybrid product retrieval' })
- Open Dashboard → API Console and select your project
- Choose PATCH /infra/decisioning/search/indexes/{index_id} from the route list
- Fill in the JSON body or Storage references, then send the request and inspect the response directly in the console
index_id requirednamedescriptionmodelexical, semantic, hybridembedding_modelrerank_modelvector_namespacemetadata_schemaDelete Search Index
Delete a search index and all synced documents.
curl -X DELETE https://api.saasignal.saastemly.com/infra/decisioning/search/indexes/{index_id} \
-H "Authorization: Bearer sk_live_..."
await ss.infra.decisioning.search.deleteIndex('sidx_123')
- Open Dashboard → API Console and select your project
- Choose DELETE /infra/decisioning/search/indexes/{index_id} from the route list
- Fill in the JSON body or Storage references, then send the request and inspect the response directly in the console
index_id requiredUpsert Search Documents
Upsert documents with caller-supplied vectors or optional auto-embedding. SaaSignal stores document state in D1 and syncs vector-capable indexes into Vectorize when possible.
curl -X POST https://api.saasignal.saastemly.com/infra/decisioning/search/indexes/{index_id}/documents/upsert \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{"documents":[]}'
{ "status": "ok" }
await ss.infra.decisioning.search.upsertDocuments('sidx_123', { auto_embed: true, documents: [{ id: 'sku_123', text: 'Waterproof trail jacket', metadata: { brand: 'Northline', in_stock: true } }] })
- Open Dashboard → Decisioning and select your project
- Go to the Search workspace
- Select the index, paste the document-upsert payload into the seed card, and run it to refresh lexical and semantic retrieval state.
index_id requiredauto_embedtruedocuments requiredList Search Documents
List caller-owned documents stored in a managed search index.
curl https://api.saasignal.saastemly.com/infra/decisioning/search/indexes/{index_id}/documents \
-H "Authorization: Bearer sk_live_..."
{ "status": "ok" }
const { documents } = await ss.infra.decisioning.search.listDocuments('sidx_123')
- Open Dashboard → API Console and select your project
- Choose GET /infra/decisioning/search/indexes/{index_id}/documents from the route list
- Fill in the JSON body or Storage references, then send the request and inspect the response directly in the console
index_id requiredGet Search Document
Get one caller-owned document stored in a managed search index.
curl https://api.saasignal.saastemly.com/infra/decisioning/search/indexes/{index_id}/documents/{document_id} \
-H "Authorization: Bearer sk_live_..."
{ "status": "ok" }
const document = await ss.infra.decisioning.search.getDocument('sidx_123', 'sku_123')
- Open Dashboard → API Console and select your project
- Choose GET /infra/decisioning/search/indexes/{index_id}/documents/{document_id} from the route list
- Fill in the JSON body or Storage references, then send the request and inspect the response directly in the console
index_id requireddocument_id requiredDelete Search Document
Delete one document from a search index.
curl -X DELETE https://api.saasignal.saastemly.com/infra/decisioning/search/indexes/{index_id}/documents/{document_id} \
-H "Authorization: Bearer sk_live_..."
await ss.infra.decisioning.search.deleteDocument('sidx_123', 'sku_123')
- Open Dashboard → API Console and select your project
- Choose DELETE /infra/decisioning/search/indexes/{index_id}/documents/{document_id} from the route list
- Fill in the JSON body or Storage references, then send the request and inspect the response directly in the console
index_id requireddocument_id requiredQuery Search Index
Query a managed search index with lexical, semantic, or hybrid retrieval, with optional AI reranking of the top candidate set.
curl -X POST https://api.saasignal.saastemly.com/infra/decisioning/search/indexes/{index_id}/query \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{}'
{ "status": "ok" }
const result = await ss.infra.decisioning.search.query('sidx_123', { query_text: 'waterproof running jacket', mode: 'hybrid', rerank: true, limit: 8 })
- Open Dashboard → Decisioning and select your project
- Go to the Search workspace
- Run the query card against the selected index to debug candidate recall, hybrid weighting, and ranked document output.
index_id requiredquery_textquery_vectorlimit10filtermodelexical, semantic, hybridalpharerankfalseSuggest Search Terms
Return prefix suggestions derived from indexed document text.
curl -X POST https://api.saasignal.saastemly.com/infra/decisioning/search/indexes/{index_id}/suggest \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{"prefix":"..."}'
{ "status": "ok" }
const { suggestions } = await ss.infra.decisioning.search.suggest('sidx_123', { prefix: 'water', limit: 5 })
- Open Dashboard → API Console and select your project
- Choose POST /infra/decisioning/search/indexes/{index_id}/suggest from the route list
- Fill in the JSON body or Storage references, then send the request and inspect the response directly in the console
index_id requiredprefix requiredlimit5Get Search Stats
Get item counts plus rebuild and vector sync state for a search index.
curl https://api.saasignal.saastemly.com/infra/decisioning/search/indexes/{index_id}/stats \
-H "Authorization: Bearer sk_live_..."
{ "status": "ok" }
const stats = await ss.infra.decisioning.search.stats('sidx_123')
- Open Dashboard → API Console and select your project
- Choose GET /infra/decisioning/search/indexes/{index_id}/stats from the route list
- Fill in the JSON body or Storage references, then send the request and inspect the response directly in the console
index_id requiredRebuild Search Index
Re-sync lexical and semantic state for all documents in the index. Async mode updates rebuild status in the background.
curl -X POST https://api.saasignal.saastemly.com/infra/decisioning/search/indexes/{index_id}/rebuild \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{}'
{ "status": "ok" }
await ss.infra.decisioning.search.rebuild('sidx_123', { async: true })
- Open Dashboard → API Console and select your project
- Choose POST /infra/decisioning/search/indexes/{index_id}/rebuild from the route list
- Fill in the JSON body or Storage references, then send the request and inspect the response directly in the console
index_id requiredasyncfalse