@@ -71,7 +71,7 @@ def __init__(
71
71
content_field : str = "content" ,
72
72
name_field : str = "name" ,
73
73
embedding_field : str = "embedding" ,
74
- use_sparse_embeddings : bool = False , # noqa: FBT001, FBT002
74
+ use_sparse_embeddings : bool = True , # noqa: FBT001, FBT002
75
75
sparse_embedding_field : str = "sparse_embedding" ,
76
76
similarity : str = "cosine" ,
77
77
return_embedding : bool = False , # noqa: FBT001, FBT002
@@ -139,6 +139,7 @@ def __init__(
139
139
self .wait_result_from_api = wait_result_from_api
140
140
self .recreate_index = recreate_index
141
141
self .payload_fields_to_index = payload_fields_to_index
142
+ self .use_sparse_embeddings = use_sparse_embeddings
142
143
143
144
# Make sure the collection is properly set up
144
145
self ._set_up_collection (
@@ -150,7 +151,6 @@ def __init__(
150
151
self .content_field = content_field
151
152
self .name_field = name_field
152
153
self .embedding_field = embedding_field
153
- self .use_sparse_embeddings = use_sparse_embeddings
154
154
self .sparse_embedding_field = sparse_embedding_field
155
155
self .similarity = similarity
156
156
self .index = index
@@ -457,7 +457,7 @@ def _set_up_collection(
457
457
if self .use_sparse_embeddings and not isinstance (collection_info .config .params .vectors , dict ):
458
458
msg = (
459
459
f"Collection '{ collection_name } ' already exists in Qdrant, "
460
- f"but it has been originaly created without sparse embedding vectors."
460
+ f"but it has been originally created without sparse embedding vectors."
461
461
f"If you want to use that collection, either set `use_sparse_embeddings=False` "
462
462
f"or run a migration script "
463
463
f"to use Named Dense Vectors (`text-sparse`) and Named Sparse Vectors (`text-dense`)."
0 commit comments