superduper-qdrant 0.9.0__tar.gz → 0.9.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: superduper_qdrant
3
- Version: 0.9.0
3
+ Version: 0.9.2
4
4
  Summary: SuperDuper Lance is a Python library that provides a high-level API for working with Lance vector search database.
5
5
  Maintainer-email: "superduper.io, Inc." <opensource@superduper.io>
6
6
  License:
@@ -1,5 +1,5 @@
1
1
  from .qdrant import QdrantVectorSearcher as VectorSearcher
2
2
 
3
- __version__ = "0.9.0"
3
+ __version__ = "0.9.2"
4
4
 
5
5
  __all__ = ['VectorSearcher']
@@ -5,7 +5,7 @@ from copy import deepcopy
5
5
 
6
6
  import numpy as np
7
7
  from qdrant_client import QdrantClient, models
8
- from superduper import CFG
8
+ from superduper import CFG, logging
9
9
  from superduper.backends.base.vector_search import (
10
10
  BaseVectorSearcher,
11
11
  VectorIndexMeasureType,
@@ -36,6 +36,8 @@ class QdrantVectorSearcher(BaseVectorSearcher):
36
36
  config_dict = deepcopy(CFG.vector_search_kwargs)
37
37
  try:
38
38
  plugin, uri = CFG.vector_search_engine.split("://")
39
+ if not uri.startswith("http") and uri != ":memory:":
40
+ uri = f"http://{uri}"
39
41
  if uri:
40
42
  config_dict['location'] = uri
41
43
  except ValueError as e:
@@ -51,6 +53,8 @@ class QdrantVectorSearcher(BaseVectorSearcher):
51
53
  # Use an in-memory instance by default
52
54
  # https://github.com/qdrant/qdrant-client#local-mode
53
55
  config_dict = config_dict or {"location": ":memory:"}
56
+ if '6334' in config_dict['location']:
57
+ config_dict["prefer_grpc"] = True
54
58
  self.client = QdrantClient(**config_dict)
55
59
  self.identifier = identifier
56
60
  self.measure = measure
@@ -107,6 +111,7 @@ class QdrantVectorSearcher(BaseVectorSearcher):
107
111
  payload={ID_PAYLOAD_KEY: item.id},
108
112
  )
109
113
  points.append(point)
114
+ logging.info(f"Adding {len(points)} points to Qdrant index '{self.identifier}'")
110
115
  self.client.upsert(collection_name=self.identifier, points=points)
111
116
 
112
117
  def drop(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: superduper_qdrant
3
- Version: 0.9.0
3
+ Version: 0.9.2
4
4
  Summary: SuperDuper Lance is a Python library that provides a high-level API for working with Lance vector search database.
5
5
  Maintainer-email: "superduper.io, Inc." <opensource@superduper.io>
6
6
  License: