Create TF-IDF index using cosdata client
(collection, k, b)
| 56 | |
| 57 | |
| 58 | def create_explicit_index(collection, k, b): |
| 59 | """Create TF-IDF index using cosdata client""" |
| 60 | # For TF-IDF, we create a specific index configuration |
| 61 | index = collection.create_tf_idf_index( |
| 62 | name=collection.name, sample_threshold=1000, k1=k, b=b |
| 63 | ) |
| 64 | return index |
| 65 | |
| 66 | |
| 67 | def compute_bm25_idf(total_documents, docs_containing_term): |
no outgoing calls
no test coverage detected