Search Entities
Full-text search across all entity types in the metadata catalog. Uses Elasticsearch query syntax under the hood.
Query Parameters
Search query string. Supports Elasticsearch query syntax including wildcards, boolean operators, and phrase matching.
Search index to query. Options: all, table_search_index, topic_search_index, dashboard_search_index, pipeline_search_index, mlmodel_search_index, container_search_index, search_entity_search_index, glossary_term_search_index, tag_search_index, user_search_index, team_search_index, domain_search_index, data_product_search_index.
Starting offset for pagination.
Number of results to return.
Include soft-deleted entities in the results.
Field to sort by (e.g., name, updatedAt, totalVotes).
Track exact total hit count. Set to false for faster queries when exact count is not needed.
Include entity hierarchy in results.
Include the full source document in results. Set to false to return only metadata.
Comma-separated list of source fields to include. Use this to limit the response payload.
JSON query filter using Elasticsearch DSL. Applied before scoring.
JSON post-filter using Elasticsearch DSL. Applied after scoring without affecting aggregations.
from metadata.sdk import configure, get_client
configure(
host="https://your-company.getcollate.io/api",
jwt_token="your-jwt-token"
)
client = get_client()
# Search for tables matching "customer"
response = client.get("/search/query", params={
"q": "customer",
"index": "table_search_index",
"from": 0,
"size": 10
})
for hit in response["hits"]["hits"]:
entity = hit["_source"]
print(f"{entity['entityType']}: {entity['fullyQualifiedName']} (score: {hit['_score']})")
{
"took": 8,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"failed": 0,
"skipped": 0
},
"hits": {
"total": {
"value": 53,
"relation": "eq"
},
"hits": [
{
"_index": "table_search_index",
"_id": "455e3d9d-dbbf-455e-b3be-7191daa825f3",
"_score": 2.3,
"_source": {
"id": "455e3d9d-dbbf-455e-b3be-7191daa825f3",
"name": "dim_address",
"fullyQualifiedName": "sample_data.ecommerce_db.shopify.dim_address",
"entityType": "table",
"serviceType": "BigQuery",
"description": "Address dimension table",
"owners": [],
"tags": [],
"columns": [
{
"name": "address_id",
"dataType": "NUMERIC",
"fullyQualifiedName": "sample_data.ecommerce_db.shopify.dim_address.address_id"
}
]
}
}
]
}
}
Returns
Returns an Elasticsearch-style response containing matched entities ranked by relevance score.
Response
Time in milliseconds the search took to execute.
Whether the search timed out.
Search results container.
Total hit count information.
Total number of matching entities.
Relation to the actual count. eq means exact, gte means the count is a lower bound.
Array of matching entity results.
Search index the result was found in (e.g., table_search_index).
Unique identifier of the entity (UUID format).
Relevance score for the match. Higher scores indicate better matches.
The full entity object. Contents vary by entity type but always include id, name, fullyQualifiedName, and entityType.
Error Handling
| Code | Error Type | Description |
|---|
400 | BAD_REQUEST | Invalid query syntax or parameters |
401 | UNAUTHORIZED | Invalid or missing authentication token |
403 | FORBIDDEN | User lacks permission to search entities |