MCPcopy Create free account
hub / github.com/cosdata/cosdata / search_sparse_vector

Function search_sparse_vector

tests/test-sparse-vector.py:99–107  ·  view source on GitHub ↗

Search using sparse vector with cosdata client

(collection, query_terms, top_k=10, early_terminate_threshold=0.0)

Source from the content-addressed store, hash-verified

97
98
99def search_sparse_vector(collection, query_terms, top_k=10, early_terminate_threshold=0.0):
100 """Search using sparse vector with cosdata client"""
101 # query_terms should already be in the correct format from format_for_server_query
102 results = collection.search.sparse(
103 query_terms=query_terms,
104 top_k=top_k,
105 early_terminate_threshold=early_terminate_threshold,
106 )
107 return results
108
109
110def batch_ann_search(collection, batch, top_k=10, early_terminate_threshold=0.0):

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected