Your First Search Query
Now that you have the SDK installed and documents uploaded, let's make your first search query.
Basic Search
The simplest search uses just a query string:
python
results = client.search(query="quarterly revenue report")
for doc in results:
print(f"Title: {doc.title}")
print(f"Score: {doc.score}")
print(f"Content: {doc.content[:200]}...")
print("---")Understanding Results
Each result contains:
| Field | Description |
|---|---|
id | Unique document identifier |
title | Document title |
content | Matched text content |
score | Relevance score (0-1) |
metadata | Custom metadata |
Filtering Results
Add filters to narrow your search:
python
results = client.search(
query="budget analysis",
filters={
"department": "finance",
"year": 2025
},
limit=10
)Hybrid Search Options
Enable different retrieval methods:
python
results = client.search(
query="customer feedback analysis",
options={
"retrieval": "hybrid", # dense + sparse + bm25
"rerank": True, # Enable reranking
"weights": {
"dense": 0.5,
"sparse": 0.3,
"bm25": 0.2
}
}
)Next Steps
- Hybrid Retrieval - Deep dive into retrieval methods
- Configuration - Tune retrieval weights