Search
Search via Typesense
Run full-text search across your ledger data with the Java SDK.
POST
/search/{collection}Use blnk.search().search for this operation.
Call the method
ApiResponse<JsonNode> response = blnk.search().search(
SearchParams.create()
.q("[email protected]")
.queryBy("email_address")
.perPage(10),
"identities");
| Field | Type | Description |
|---|---|---|
q | String | Search query text. Use * to return all records. |
query_by | String | Comma-separated list of fields to search in. |
filter_by | String | Filter conditions to refine results. |
sort_by | String | Sort order, for example created_at:desc. |
page | Number | Page number, starting at 1. |
per_page | Number | Results per page. Max 250, defaults to 10. |
collection | String | Collection to search: ledgers, transactions, balances, or identities. |
Use the search results
Read response.data().get("hits") for matching documents. Each hit includes a document and optional highlights and text_match score.
Response
{
"found": 2,
"out_of": 232,
"page": 1,
"request_params": {
"collection_name": "transactions",
"per_page": 10,
"q": "payment"
},
"search_time_ms": 2,
"facet_counts": [],
"search_cutoff": false,
"hits": [
{
"document": {
"id": "txn_cd728825-a6e1-4fae-9277-c3235a045ea5",
"transaction_id": "txn_cd728825-a6e1-4fae-9277-c3235a045ea5",
"amount": 532,
"currency": "USD",
"description": "Test transaction",
"source": "bln_93fb50c2-969e-49c2-bb61-ef5ed245516e",
"destination": "bln_20666087-1355-4736-ba04-3ba92a7542b9",
"status": "APPLIED",
"created_at": 1758116489
},
"highlights": [],
"text_match": 578730123365711993
}
]
}
| Field | Type | Description |
|---|---|---|
found | Number | Number of records matching the query. |
out_of | Number | Total records in the collection. |
page | Number | Current page number. |
search_time_ms | Number | Time taken to run the search, in milliseconds. |
hits | JsonNode | JSON array of search results. Each element includes a document and optional highlights and text_match. |