Skip to Content
ConceptsSearch

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

ParameterDescriptionDefaultMax
VectorQuery vector — must match the index dimensionRequired
Top KNumber of results to return10512
EFSearch quality parameter — higher values explore more candidates1281024
Include VectorsInclude the stored vector data in resultsfalse
FilterFilter conditions to restrict results (see Filtering)None
Prefilter Cardinality ThresholdTune when prefiltering kicks in (see Filter Tuning)10,0001,000,000
Filter Boost PercentageExpand the candidate pool when filtering reduces results0100
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:

ParameterDescriptionDefault
Sparse IndicesNon-zero term positions in the sparse query vectorRequired
Sparse ValuesWeights corresponding to each sparse index positionRequired
dense_rrf_weightWeight given to the dense ranking in RRF merging (0.0 → full sparse, 1.0 → full dense, 0.5 → equal)0.5
rank_rrf_constantSmoothing constant that dampens the effect of top ranks; higher values flatten the score curve60
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:

ModeProvideUse When
Dense onlyDense vector onlyPure semantic similarity search
Sparse onlysparse_indices + sparse_values onlyPure keyword-based search
HybridBoth dense and sparse componentsCombined semantic + keyword search
# 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:

FieldDescription
IDUnique identifier of the matched vector
SimilaritySimilarity score — higher means more similar
DistanceDistance score — lower means more similar
MetaMetadata object attached to the vector
NormVector norm value
VectorVector data — only included when Include Vectors is true
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]}...")