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

Function search_sparse_vector

tests/test-tf-idf-bm25.py:520–523  ·  view source on GitHub ↗

Search using TF-IDF with cosdata client

(collection, vector, top_k)

Source from the content-addressed store, hash-verified

518
519
520def search_sparse_vector(collection, vector, top_k):
521 """Search using TF-IDF with cosdata client"""
522 results = collection.search.text(query_text=vector["text"], top_k=top_k)
523 return results
524
525
526def batch_ann_search(collection, batch, top_k):

Callers 1

timed_queryFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected