qdrant-ruby 0.9.8 → 0.9.10
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile +3 -3
- data/Gemfile.lock +43 -29
- data/lib/qdrant/collections.rb +9 -4
- data/lib/qdrant/points.rb +40 -1
- data/lib/qdrant/version.rb +1 -1
- metadata +3 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6269ed0349b2612a9221b36a181df8c4126e4542685b313dcf839cfc5a91314a
|
|
4
|
+
data.tar.gz: 660452185073d98c71d11ebe68b18dd5c0b16ee96085d830896529a618f473e9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7b4b80c0d1867ca65b7710974f6c13dd5e885b84b8ded38a2c34499ecff63ed3fdf782fa35a892ea32a110b3448a3b49b61e8f5e1dd7cd2f3ff946065c7ea80a
|
|
7
|
+
data.tar.gz: 8c4957ff10a42198a4f0a133323c99d197eec8177e5c3daec7b1d708255ce101c1b5e4b9e3a70b0fc7e11ac7bda2da15b15a312932875ba36d556468e08527ad
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,74 +1,88 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
qdrant-ruby (0.9.
|
|
4
|
+
qdrant-ruby (0.9.10)
|
|
5
5
|
faraday (>= 2.0.1, < 3)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: https://rubygems.org/
|
|
9
9
|
specs:
|
|
10
10
|
ast (2.4.2)
|
|
11
|
+
base64 (0.2.0)
|
|
11
12
|
byebug (11.1.3)
|
|
12
13
|
coderay (1.1.3)
|
|
13
|
-
diff-lcs (1.
|
|
14
|
-
faraday (2.
|
|
14
|
+
diff-lcs (1.6.2)
|
|
15
|
+
faraday (2.8.1)
|
|
16
|
+
base64
|
|
15
17
|
faraday-net_http (>= 2.0, < 3.1)
|
|
16
18
|
ruby2_keywords (>= 0.0.4)
|
|
17
19
|
faraday-net_http (3.0.2)
|
|
18
|
-
json (2.
|
|
20
|
+
json (2.7.4)
|
|
19
21
|
language_server-protocol (3.17.0.3)
|
|
22
|
+
lint_roller (1.1.0)
|
|
20
23
|
method_source (1.0.0)
|
|
21
|
-
parallel (1.
|
|
22
|
-
parser (3.
|
|
24
|
+
parallel (1.24.0)
|
|
25
|
+
parser (3.3.5.0)
|
|
23
26
|
ast (~> 2.4.1)
|
|
27
|
+
racc
|
|
24
28
|
pry (0.14.2)
|
|
25
29
|
coderay (~> 1.1)
|
|
26
30
|
method_source (~> 1.0)
|
|
27
31
|
pry-byebug (3.10.1)
|
|
28
32
|
byebug (~> 11.0)
|
|
29
33
|
pry (>= 0.13, < 0.15)
|
|
34
|
+
racc (1.8.1)
|
|
30
35
|
rainbow (3.1.1)
|
|
31
|
-
rake (13.
|
|
32
|
-
regexp_parser (2.
|
|
33
|
-
rexml (3.2
|
|
34
|
-
rspec (3.
|
|
35
|
-
rspec-core (~> 3.
|
|
36
|
-
rspec-expectations (~> 3.
|
|
37
|
-
rspec-mocks (~> 3.
|
|
38
|
-
rspec-core (3.
|
|
39
|
-
rspec-support (~> 3.
|
|
40
|
-
rspec-expectations (3.
|
|
36
|
+
rake (13.3.1)
|
|
37
|
+
regexp_parser (2.9.2)
|
|
38
|
+
rexml (3.4.2)
|
|
39
|
+
rspec (3.13.2)
|
|
40
|
+
rspec-core (~> 3.13.0)
|
|
41
|
+
rspec-expectations (~> 3.13.0)
|
|
42
|
+
rspec-mocks (~> 3.13.0)
|
|
43
|
+
rspec-core (3.13.6)
|
|
44
|
+
rspec-support (~> 3.13.0)
|
|
45
|
+
rspec-expectations (3.13.5)
|
|
41
46
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
42
|
-
rspec-support (~> 3.
|
|
43
|
-
rspec-mocks (3.
|
|
47
|
+
rspec-support (~> 3.13.0)
|
|
48
|
+
rspec-mocks (3.13.6)
|
|
44
49
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
45
|
-
rspec-support (~> 3.
|
|
46
|
-
rspec-support (3.
|
|
47
|
-
rubocop (1.
|
|
50
|
+
rspec-support (~> 3.13.0)
|
|
51
|
+
rspec-support (3.13.6)
|
|
52
|
+
rubocop (1.50.2)
|
|
48
53
|
json (~> 2.3)
|
|
49
54
|
parallel (~> 1.10)
|
|
50
55
|
parser (>= 3.2.0.0)
|
|
51
56
|
rainbow (>= 2.2.2, < 4.0)
|
|
52
57
|
regexp_parser (>= 1.8, < 3.0)
|
|
53
58
|
rexml (>= 3.2.5, < 4.0)
|
|
54
|
-
rubocop-ast (>= 1.
|
|
59
|
+
rubocop-ast (>= 1.28.0, < 2.0)
|
|
55
60
|
ruby-progressbar (~> 1.7)
|
|
56
61
|
unicode-display_width (>= 2.4.0, < 3.0)
|
|
57
|
-
rubocop-ast (1.
|
|
62
|
+
rubocop-ast (1.30.0)
|
|
58
63
|
parser (>= 3.2.1.0)
|
|
59
64
|
rubocop-performance (1.16.0)
|
|
60
65
|
rubocop (>= 1.7.0, < 2.0)
|
|
61
66
|
rubocop-ast (>= 0.4.0)
|
|
62
67
|
ruby-progressbar (1.13.0)
|
|
63
68
|
ruby2_keywords (0.0.5)
|
|
64
|
-
standard (1.
|
|
69
|
+
standard (1.28.5)
|
|
65
70
|
language_server-protocol (~> 3.17.0.2)
|
|
66
|
-
|
|
71
|
+
lint_roller (~> 1.0)
|
|
72
|
+
rubocop (~> 1.50.2)
|
|
73
|
+
standard-custom (~> 1.0.0)
|
|
74
|
+
standard-performance (~> 1.0.1)
|
|
75
|
+
standard-custom (1.0.2)
|
|
76
|
+
lint_roller (~> 1.0)
|
|
77
|
+
rubocop (~> 1.50)
|
|
78
|
+
standard-performance (1.0.1)
|
|
79
|
+
lint_roller (~> 1.0)
|
|
67
80
|
rubocop-performance (~> 1.16.0)
|
|
68
|
-
unicode-display_width (2.
|
|
81
|
+
unicode-display_width (2.6.0)
|
|
69
82
|
|
|
70
83
|
PLATFORMS
|
|
71
84
|
arm64-darwin-23
|
|
85
|
+
arm64-darwin-24
|
|
72
86
|
x86_64-darwin-19
|
|
73
87
|
x86_64-darwin-21
|
|
74
88
|
x86_64-linux
|
|
@@ -76,9 +90,9 @@ PLATFORMS
|
|
|
76
90
|
DEPENDENCIES
|
|
77
91
|
pry-byebug (~> 3.9)
|
|
78
92
|
qdrant-ruby!
|
|
79
|
-
rake (~> 13.
|
|
80
|
-
rspec (~> 3.
|
|
81
|
-
standard (~> 1.
|
|
93
|
+
rake (~> 13.3)
|
|
94
|
+
rspec (~> 3.13)
|
|
95
|
+
standard (~> 1.28.5)
|
|
82
96
|
|
|
83
97
|
BUNDLED WITH
|
|
84
98
|
2.4.0
|
data/lib/qdrant/collections.rb
CHANGED
|
@@ -20,6 +20,7 @@ module Qdrant
|
|
|
20
20
|
def create(
|
|
21
21
|
collection_name:,
|
|
22
22
|
vectors:,
|
|
23
|
+
sparse_vectors: nil,
|
|
23
24
|
shard_number: nil,
|
|
24
25
|
replication_factor: nil,
|
|
25
26
|
write_consistency_factor: nil,
|
|
@@ -33,6 +34,7 @@ module Qdrant
|
|
|
33
34
|
response = client.connection.put("#{PATH}/#{collection_name}") do |req|
|
|
34
35
|
req.body = {}
|
|
35
36
|
req.body["vectors"] = vectors
|
|
37
|
+
req.body["sparse_vectors"] = sparse_vectors unless sparse_vectors.nil?
|
|
36
38
|
req.body["shard_number"] = shard_number unless shard_number.nil?
|
|
37
39
|
req.body["replication_factor"] = replication_factor unless replication_factor.nil?
|
|
38
40
|
req.body["write_consistency_factor"] = write_consistency_factor unless write_consistency_factor.nil?
|
|
@@ -89,12 +91,15 @@ module Qdrant
|
|
|
89
91
|
def create_index(
|
|
90
92
|
collection_name:,
|
|
91
93
|
field_name:,
|
|
92
|
-
field_schema: nil
|
|
94
|
+
field_schema: nil,
|
|
95
|
+
wait: nil,
|
|
96
|
+
ordering: nil
|
|
93
97
|
)
|
|
94
98
|
response = client.connection.put("#{PATH}/#{collection_name}/index") do |req|
|
|
95
|
-
req.
|
|
96
|
-
|
|
97
|
-
|
|
99
|
+
req.params["ordering"] = ordering unless ordering.nil?
|
|
100
|
+
# Add explicit false check to avoid nil case. True is default behavior.
|
|
101
|
+
req.params["wait"] = wait unless wait.nil?
|
|
102
|
+
req.body = {field_name: field_name}
|
|
98
103
|
req.body["field_schema"] = field_schema unless field_schema.nil?
|
|
99
104
|
end
|
|
100
105
|
|
data/lib/qdrant/points.rb
CHANGED
|
@@ -294,6 +294,45 @@ module Qdrant
|
|
|
294
294
|
response.body
|
|
295
295
|
end
|
|
296
296
|
|
|
297
|
+
# Universally query points. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage queries.
|
|
298
|
+
def query(
|
|
299
|
+
collection_name:,
|
|
300
|
+
consistency: nil,
|
|
301
|
+
timeout: nil,
|
|
302
|
+
shard_key: nil,
|
|
303
|
+
prefetch: nil,
|
|
304
|
+
query: nil,
|
|
305
|
+
using: nil,
|
|
306
|
+
filter: nil,
|
|
307
|
+
params: nil,
|
|
308
|
+
score_threshold: nil,
|
|
309
|
+
limit: nil,
|
|
310
|
+
offset: nil,
|
|
311
|
+
with_vector: nil,
|
|
312
|
+
with_payload: nil,
|
|
313
|
+
lookup_from: nil
|
|
314
|
+
)
|
|
315
|
+
response = client.connection.post("collections/#{collection_name}/#{PATH}/query") do |req|
|
|
316
|
+
req.params["consistency"] = consistency unless consistency.nil?
|
|
317
|
+
req.params["timeout"] = timeout unless timeout.nil?
|
|
318
|
+
|
|
319
|
+
req.body = {}
|
|
320
|
+
req.body["shard_key"] = shard_key unless shard_key.nil?
|
|
321
|
+
req.body["prefetch"] = prefetch unless prefetch.nil?
|
|
322
|
+
req.body["query"] = query unless query.nil?
|
|
323
|
+
req.body["using"] = using unless using.nil?
|
|
324
|
+
req.body["filter"] = filter unless filter.nil?
|
|
325
|
+
req.body["params"] = params unless params.nil?
|
|
326
|
+
req.body["score_threshold"] = score_threshold unless score_threshold.nil?
|
|
327
|
+
req.body["limit"] = limit unless limit.nil?
|
|
328
|
+
req.body["offset"] = offset unless offset.nil?
|
|
329
|
+
req.body["with_vector"] = with_vector unless with_vector.nil?
|
|
330
|
+
req.body["with_payload"] = with_payload unless with_payload.nil?
|
|
331
|
+
req.body["lookup_from"] = lookup_from unless lookup_from.nil?
|
|
332
|
+
end
|
|
333
|
+
response.body
|
|
334
|
+
end
|
|
335
|
+
|
|
297
336
|
# Count points which matches given filtering condition
|
|
298
337
|
def count(
|
|
299
338
|
collection_name:,
|
|
@@ -303,7 +342,7 @@ module Qdrant
|
|
|
303
342
|
response = client.connection.post("collections/#{collection_name}/#{PATH}/count") do |req|
|
|
304
343
|
req.body = {}
|
|
305
344
|
req.body["filter"] = filter unless filter.nil?
|
|
306
|
-
req.body["exact"] =
|
|
345
|
+
req.body["exact"] = exact unless exact.nil?
|
|
307
346
|
end
|
|
308
347
|
response.body
|
|
309
348
|
end
|
data/lib/qdrant/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: qdrant-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.9.
|
|
4
|
+
version: 0.9.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrei Bondarev
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: faraday
|
|
@@ -79,7 +78,6 @@ metadata:
|
|
|
79
78
|
homepage_uri: https://github.com/andreibondarev/qdrant-ruby
|
|
80
79
|
source_code_uri: https://github.com/andreibondarev/qdrant-ruby
|
|
81
80
|
changelog_uri: https://github.com/andreibondarev/qdrant-ruby/CHANGELOG.md
|
|
82
|
-
post_install_message:
|
|
83
81
|
rdoc_options: []
|
|
84
82
|
require_paths:
|
|
85
83
|
- lib
|
|
@@ -94,8 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
94
92
|
- !ruby/object:Gem::Version
|
|
95
93
|
version: '0'
|
|
96
94
|
requirements: []
|
|
97
|
-
rubygems_version: 3.
|
|
98
|
-
signing_key:
|
|
95
|
+
rubygems_version: 3.6.9
|
|
99
96
|
specification_version: 4
|
|
100
97
|
summary: Ruby wrapper for the Qdrant vector search database API
|
|
101
98
|
test_files: []
|