Search
Endee uses Approximate Nearest Neighbor (ANN) search to find the most similar objects to a query vector. This page covers query parameters, hybrid search modes, and the structure of query results.
Query Parameters
| Parameter | Description | Default |
|---|---|---|
| Vector | Query vector (must match the collection dimension) | Required |
| Top K | Number of results to return | 10 |
| Ef_Search | Query-time search quality parameter — controls how many candidates are explored per search (higher = better recall, slower). Independent of the build-time EF Construction parameter. | 128 |
| Include Vectors | Include the stored vector data in results | false |
| Filter | Filter conditions to restrict results (see Filtering) | None |
| Prefilter Cardinality Threshold | Tune when prefiltering kicks in (see Filter Tuning) | 10,000 |
| Filter Boost Percentage | Expand the candidate pool when filtering reduces results | 0 |
Python
collection = client.get_collection(name="my_collection")
results = collection.query(
vector=[0.12, -0.34, 0.89, ...],
top_k=5,
ef=128,
include_vectors=False
)Increasing ef improves recall at the cost of latency. For most use cases, the default 128 is a good starting point.
Hybrid Query Parameters
For hybrid collections, include sparse query components alongside the dense query object:
| Parameter | Description | Default |
|---|---|---|
| Sparse Indices | Non-zero term positions in the sparse query object | Required |
| Sparse Values | Weights corresponding to each sparse index position | Required |
| dense_rrf_weight | Weight given to the dense ranking in RRF merging (0.0 → full sparse, 1.0 → full dense, 0.5 → equal) | 0.5 |
| rank_rrf_constant | Smoothing constant that dampens the effect of top ranks; higher values flatten the score curve | 60 |
Python
results = collection.query(
vector=[0.12, -0.34, 0.89, ...],
sparse_indices=[4821, 19043, 73201],
sparse_values=[1.2, 0.9, 1.1],
top_k=5
)Query Modes
Hybrid collections support three query modes:
| Mode | Provide | Use When |
|---|---|---|
| Dense only | Dense vector only | Pure semantic similarity search |
| Sparse only | sparse_indices + sparse_values only | Pure keyword-based search |
| Hybrid | Both dense and sparse components | Combined semantic + keyword search |
Python
# Dense only
results = collection.query(vector=[...], top_k=5)
# Sparse only
results = collection.query(
sparse_indices=[4821, 19043],
sparse_values=[1.2, 0.9],
top_k=5
)
# Hybrid
results = collection.query(
vector=[...],
sparse_indices=[4821, 19043],
sparse_values=[1.2, 0.9],
top_k=5
)Result Fields
Each result in a query response contains:
| Field | Description |
|---|---|
| ID | Unique identifier of the matched object |
| Similarity | Similarity score (higher means more similar) |
| Distance | Distance score (lower means more similar) |
| Meta | Metadata object attached to the object |
| Norm | Object norm value |
| Vector | Vector data (only included when Include Vectors is true) |
Python
results = collection.query(vector=[...], top_k=3, include_vectors=True)
for item in results:
print(f"ID: {item['id']}")
print(f"Similarity: {item['similarity']:.4f}")
print(f"Meta: {item['meta']}")
print(f"Vector: {item['vector'][:3]}...")