Search
Endee uses Approximate Nearest Neighbor (ANN) search to find the most similar vectors to a query vector. This page covers query parameters, hybrid search modes, and the structure of query results.
Query Parameters
| Parameter | Description | Default | Max |
|---|---|---|---|
| Vector | Query vector — must match the index dimension | Required | — |
| Top K | Number of results to return | 10 | 512 |
| EF | Search quality parameter — higher values explore more candidates | 128 | 1024 |
| 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 | 1,000,000 |
| Filter Boost Percentage | Expand the candidate pool when filtering reduces results | 0 | 100 |
Python
index = client.get_index(name="my_index")
results = index.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 indexes, include sparse query components alongside the dense query vector:
| Parameter | Description | Default |
|---|---|---|
| Sparse Indices | Non-zero term positions in the sparse query vector | 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 = index.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 indexes 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 = index.query(vector=[...], top_k=5)
# Sparse only
results = index.query(
sparse_indices=[4821, 19043],
sparse_values=[1.2, 0.9],
top_k=5
)
# Hybrid
results = index.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 vector |
| Similarity | Similarity score — higher means more similar |
| Distance | Distance score — lower means more similar |
| Meta | Metadata object attached to the vector |
| Norm | Vector norm value |
| Vector | Vector data — only included when Include Vectors is true |
Python
results = index.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]}...")