diff --git a/examples/hello_hybrid_sparse_dense.py b/examples/hello_hybrid_sparse_dense.py index 3c30d03d1..08deb9d43 100644 --- a/examples/hello_hybrid_sparse_dense.py +++ b/examples/hello_hybrid_sparse_dense.py @@ -77,7 +77,7 @@ def random_embedding(texts): # into memory for efficient search. sparse_index = {"index_type": "SPARSE_INVERTED_INDEX", "metric_type": "IP"} col.create_index("sparse_vector", sparse_index) -dense_index = {"index_type": "FLAT", "metric_type": "L2"} +dense_index = {"index_type": "FLAT", "metric_type": "IP"} col.create_index("dense_vector", dense_index) col.load() @@ -93,7 +93,7 @@ def random_embedding(texts): sparse_search_params = {"metric_type": "IP"} sparse_req = AnnSearchRequest(query_embeddings["sparse"], "sparse_vector", sparse_search_params, limit=k) -dense_search_params = {"metric_type": "L2"} +dense_search_params = {"metric_type": "IP"} dense_req = AnnSearchRequest(query_embeddings["dense"], "dense_vector", dense_search_params, limit=k)