Search
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.
Boundary: Search indexes are retrieval infrastructure, not an application database. Keep catalog truth, ACLs, and final answer generation in your own SQL and service layer.
Create Search Index
GET
typescript
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
List Search Indexes
GET
typescript
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
typescript
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
Update Search Index
GET
typescript
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
Delete Search Index
GET
typescript
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
Upsert Search Documents
GET
typescript
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.
List Search Documents
GET
typescript
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
Get Search Document
GET
typescript
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
Delete Search Document
GET
typescript
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
Query Search Index
GET
typescript
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.
Suggest Search Terms
GET
typescript
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
Get Search Stats
GET
typescript
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
Rebuild Search Index
GET
typescript
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