superduper-qdrant 0.9.1__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.1
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.1"
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,7 +36,7 @@ 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"):
39
+ if not uri.startswith("http") and uri != ":memory:":
40
40
  uri = f"http://{uri}"
41
41
  if uri:
42
42
  config_dict['location'] = uri
@@ -53,6 +53,8 @@ class QdrantVectorSearcher(BaseVectorSearcher):
53
53
  # Use an in-memory instance by default
54
54
  # https://github.com/qdrant/qdrant-client#local-mode
55
55
  config_dict = config_dict or {"location": ":memory:"}
56
+ if '6334' in config_dict['location']:
57
+ config_dict["prefer_grpc"] = True
56
58
  self.client = QdrantClient(**config_dict)
57
59
  self.identifier = identifier
58
60
  self.measure = measure
@@ -109,6 +111,7 @@ class QdrantVectorSearcher(BaseVectorSearcher):
109
111
  payload={ID_PAYLOAD_KEY: item.id},
110
112
  )
111
113
  points.append(point)
114
+ logging.info(f"Adding {len(points)} points to Qdrant index '{self.identifier}'")
112
115
  self.client.upsert(collection_name=self.identifier, points=points)
113
116
 
114
117
  def drop(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: superduper_qdrant
3
- Version: 0.9.1
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: