Cross-Collection Search — MDDB API
Search across multiple collections using embeddings or text queries
Cross-collection vector search #
POST /v1/cross-search
Search across multiple collections using a source document's embedding vector or a text query. Useful for finding related content across different collection types (e.g., images matching blog post content).
Authorization: BearerAuth or APIKeyAuth or none
Request body #
Required.
Content type application/json: CrossSearchRequest
{
"algorithm": "flat",
"distanceMetric": "cosine",
"explain": false,
"feedbackMode": "query",
"feedbackWeight": 0.5,
"filter": {
"kind": {
"not": [
"test"
]
},
"modified": {
"gte": "2026-09-01"
},
"path": {
"prefix": "internal/"
},
"size": {
"lt": 10000
},
"summary": {
"exists": true
},
"title": {
"contains": "hnsw"
}
},
"format": "results",
"groupBy": {
"key": "path",
"perGroup": 1
},
"includeContent": false,
"includeImages": false,
"latencyTargetMs": 0,
"negative": [
"string"
],
"oversample": 0,
"passageLines": 0,
"positive": [
"string"
],
"query": "machine learning tutorial",
"queryVector": [
0
],
"rocchio": {
"alpha": 1,
"beta": 0.75,
"gamma": 0.25
},
"searchType": "vector",
"sourceCollection": "content",
"sourceDocID": "post-123",
"targetCollections": [
"images",
"audio"
],
"threshold": 0.5,
"topK": 10,
"waitForIndex": 0,
"waitForKeys": [
"string"
]
}
Responses #
| Status | Description | Body |
|---|---|---|
200 |
Cross-collection search results | CrossSearchResponse (application/json) |
400 |
Invalid request | ErrorResponse (application/json) |