import requests
url = "https://api.hydradb.com/recall/boolean_recall"
payload = {
"tenant_id": "tenant_1234",
"query": "John Smith Jake",
"sub_tenant_id": "sub_tenant_4567",
"operator": "and",
"max_results": 1,
"search_mode": "sources"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tenant_id: 'tenant_1234',
query: 'John Smith Jake',
sub_tenant_id: 'sub_tenant_4567',
operator: 'and',
max_results: 1,
search_mode: 'sources'
})
};
fetch('https://api.hydradb.com/recall/boolean_recall', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.hydradb.com/recall/boolean_recall \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tenant_id": "tenant_1234",
"query": "John Smith Jake",
"sub_tenant_id": "sub_tenant_4567",
"operator": "and",
"max_results": 1,
"search_mode": "sources"
}
'{
"chunks": [],
"sources": [
{
"id": "HydraDoc1234",
"title": "<title>",
"type": "<type>",
"description": "<description>",
"url": "<url>",
"timestamp": "<timestamp>",
"tenant_metadata": {},
"document_metadata": {}
}
],
"graph_context": {
"query_paths": [],
"chunk_relations": [],
"chunk_id_to_group_ids": {}
},
"additional_context": {}
}{
"detail": {
"success": false,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": false,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": false,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": false,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": false,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": false,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": false,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": false,
"message": "Error occurred",
"error_code": "<string>"
}
}Boolean Recall
Deterministic full-text search – exact term matching, no embeddings.
import requests
url = "https://api.hydradb.com/recall/boolean_recall"
payload = {
"tenant_id": "tenant_1234",
"query": "John Smith Jake",
"sub_tenant_id": "sub_tenant_4567",
"operator": "and",
"max_results": 1,
"search_mode": "sources"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tenant_id: 'tenant_1234',
query: 'John Smith Jake',
sub_tenant_id: 'sub_tenant_4567',
operator: 'and',
max_results: 1,
search_mode: 'sources'
})
};
fetch('https://api.hydradb.com/recall/boolean_recall', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.hydradb.com/recall/boolean_recall \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tenant_id": "tenant_1234",
"query": "John Smith Jake",
"sub_tenant_id": "sub_tenant_4567",
"operator": "and",
"max_results": 1,
"search_mode": "sources"
}
'{
"chunks": [],
"sources": [
{
"id": "HydraDoc1234",
"title": "<title>",
"type": "<type>",
"description": "<description>",
"url": "<url>",
"timestamp": "<timestamp>",
"tenant_metadata": {},
"document_metadata": {}
}
],
"graph_context": {
"query_paths": [],
"chunk_relations": [],
"chunk_id_to_group_ids": {}
},
"additional_context": {}
}{
"detail": {
"success": false,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": false,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": false,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": false,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": false,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": false,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": false,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": false,
"message": "Error occurred",
"error_code": "<string>"
}
}When to use it
/recall/boolean_recall runs a BM25-style full-text search. It’s the right tool when:
- Exact terms matter – product codes, error codes, legal terms, regulatory IDs
- Auditability matters – compliance searches need provable matches, not “semantically similar”
- Speed matters – no embedding inference, no graph traversal, no reranking
full_recall when the query is a literal lookup, not a semantic question.
Endpoint
- Auth: Bearer token
- Idempotency: Read-only
- Async: No
Example
curl -X POST 'https://api.hydradb.com/recall/boolean_recall' \
-H "Authorization: Bearer <your_api_key>" \
-H "Content-Type: application/json" \
-d '{
"tenant_id": "my_first_tenant",
"query": "ERROR_429 rate limit",
"operator": "and",
"max_results": 10,
"search_mode": "sources"
}'
const result = await client.recall.booleanRecall({
tenant_id: "my_first_tenant",
query: "ERROR_429 rate limit",
operator: "and",
max_results: 10,
search_mode: "sources"
});
result = client.recall.boolean_recall(
tenant_id="my_first_tenant",
query="ERROR_429 rate limit",
operator="and",
max_results=10,
search_mode="sources",
)
Request parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
tenant_id | string | Yes | – | The tenant to search. |
query | string | Yes | – | Search terms. Tokenized for matching. |
sub_tenant_id | string | No | default | Sub-tenant scope. |
operator | enum | No | or | or (any term), and (all terms), phrase (exact phrase in order). |
max_results | integer | No | 10 | Maximum number of chunks to return. |
search_mode | enum | No | sources | sources (knowledge) or memories (user memories). |
Operators
| Operator | Behavior | Example |
|---|---|---|
or (default) | Match chunks containing any of the search terms | Query "refund cancel" matches chunks with either “refund” or “cancel” |
and | Match chunks containing all of the search terms | Query "refund cancel" matches chunks with both terms |
phrase | Match chunks containing the exact phrase in order | Query "refund within 30 days" matches that exact wording |
Response
Same shape asPOST /recall/full_recall.
{
"chunks": [
{
"chunk_uuid": "...",
"source_id": "doc_67890",
"chunk_content": "If you encounter ERROR_429, you've exceeded the rate limit. Wait and retry.",
"source_title": "API Error Codes",
"relevancy_score": 1.0,
"additional_metadata": { "category": "errors" }
}
],
"sources": [...]
}
relevancy_score reflects BM25 scoring rather than semantic similarity.
Boolean vs full recall
boolean_recall | full_recall | |
|---|---|---|
| Match type | Exact term/phrase | Semantic similarity |
| Embeddings | No | Yes |
| Graph traversal | No | Optional |
| Reranking | No | Yes (in thinking mode) |
| Best for | Lookups, audits, compliance | Q&A, exploration, RAG |
| Latency | Lowest | Higher (especially thinking mode) |
Behavior notes
phrase operator is order-sensitive. “30 days refund” will not match “refund within 30 days.” Use and if you want all terms regardless of order.Related endpoints
- For semantic search: Full recall – embeddings + graph
Errors
Common codes:400 INVALID_PARAMETERS, 404 TENANT_NOT_FOUND, 422 VALIDATION_ERROR, 429 RATE_LIMITED. See Error Responses for the full list.
Read more: Essentials → RecallAuthorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Unique identifier for the tenant/organization
"tenant_1234"
Search terms to find in your content
"John Smith Jake"
Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
"sub_tenant_4567"
How to combine search terms: 'or' (any term matches), 'and' (all terms must match), 'phrase' (exact phrase must appear)
or, and, phrase "and"
Maximum number of results to return
1
What to search: 'sources' for documents or 'memories' for user memories
sources, memories Response
Successful Response
Result of a hybrid search retrieval operation.
Show child attributes
Show child attributes
[]
Deduplicated source documents corresponding to the returned chunks
Show child attributes
Show child attributes
Graph context containing query-based paths and chunk-based relation paths.
Show child attributes
Show child attributes
Map of chunk_uuid to VectorStoreChunk for extra context from forcefully related sources. Use chunk.extra_context_ids to look up chunks: extra_context[id] for id in chunk.extra_context_ids.
Show child attributes
Show child attributes
Was this page helpful?
