turbopuffer-ruby 0.2.2 → 0.2.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 99e3eb20688e659187c07ca3df07cef9944c9693c33943a6aae50d8478522825
4
- data.tar.gz: 875c6325825502c3a526b7a1d6aef25d4f35b4a2bed71a9969e628ae7d923c02
3
+ metadata.gz: 5b1e5ee7c731fa9997237ad7f6d925613aa81d2e648db8fb45ea5e57a5c2ffa4
4
+ data.tar.gz: 5a290b29f1a20db2a0662d80905d1ec67ec7aaaeed1fc12ee75cbe4442c33ebe
5
5
  SHA512:
6
- metadata.gz: abc1a9f6fcbbf0f4a327dc021f3c1da3cba5a575a9078cf345e2ea1d8f4bd099a9697c320d5000a9075419b11aa3b887d476e42bd75a75a54d9db5eab2e1e9f7
7
- data.tar.gz: 1e1ffce5e90387ed0125c5e2bcb548c4f6e0e345f4ab87d28f1efe2cdfd75ecb729ebdd231887dbfb27f8acc508c217cbd7d8c00dd03b4e29aead0d2f529a83e
6
+ metadata.gz: 74f87502fe4f218c32eb90940633c289eb11259086d2c361e3b37aa5211a082eb002448ab45ace5b49d1c10800061bbe85948b6a7fdef56ca98234f8ea3f3aac
7
+ data.tar.gz: e7ed69482a28c867bf5efc807151e50cbbe504a2cf5b1f10bf8ff5c9c9b6591d0ad579106e75b4df1db5c13b380c578c930391bddf357e033b4d6b02b92b3c50
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.3 (2025-07-29)
4
+
5
+ Full Changelog: [v0.2.2...v0.2.3](https://github.com/turbopuffer/turbopuffer-ruby/compare/v0.2.2...v0.2.3)
6
+
7
+ ### Bug Fixes
8
+
9
+ * **api:** api update ([fc8709f](https://github.com/turbopuffer/turbopuffer-ruby/commit/fc8709fbebe7d26a2d82a8ba3c28b0e7f606cea2))
10
+ * **api:** api update ([5295ae2](https://github.com/turbopuffer/turbopuffer-ruby/commit/5295ae24caff9edd7acc8f14a8321323a831cf70))
11
+
3
12
  ## 0.2.2 (2025-07-29)
4
13
 
5
14
  Full Changelog: [v0.2.1...v0.2.2](https://github.com/turbopuffer/turbopuffer-ruby/compare/v0.2.1...v0.2.2)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "turbopuffer-ruby", "~> 0.2.2"
20
+ gem "turbopuffer-ruby", "~> 0.2.3"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -126,7 +126,7 @@ Error codes are as follows:
126
126
 
127
127
  ### Retries
128
128
 
129
- Certain errors will be automatically retried 2 times by default, with a short exponential backoff.
129
+ Certain errors will be automatically retried 4 times by default, with a short exponential backoff.
130
130
 
131
131
  Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict, 429 Rate Limit, >=500 Internal errors, and timeouts will all be retried by default.
132
132
 
@@ -135,7 +135,7 @@ You can use the `max_retries` option to configure or disable this:
135
135
  ```ruby
136
136
  # Configure the default for all requests:
137
137
  turbopuffer = Turbopuffer::Client.new(
138
- max_retries: 0 # default is 2
138
+ max_retries: 0 # default is 4
139
139
  )
140
140
 
141
141
  # Or, configure per-request:
@@ -3,14 +3,14 @@
3
3
  module Turbopuffer
4
4
  class Client < Turbopuffer::Internal::Transport::BaseClient
5
5
  # Default max number of retries to attempt after a failed retryable request.
6
- DEFAULT_MAX_RETRIES = 2
6
+ DEFAULT_MAX_RETRIES = 4
7
7
 
8
8
  # Default per-request timeout.
9
9
  DEFAULT_TIMEOUT_IN_SECONDS = 60.0
10
10
 
11
11
  # Default initial retry delay in seconds.
12
12
  # Overall delay is calculated using exponential backoff + jitter.
13
- DEFAULT_INITIAL_RETRY_DELAY = 0.5
13
+ DEFAULT_INITIAL_RETRY_DELAY = 0.3
14
14
 
15
15
  # Default max retry delay in seconds.
16
16
  DEFAULT_MAX_RETRY_DELAY = 8.0
@@ -23,6 +23,12 @@ module Turbopuffer
23
23
  # @return [Boolean, Turbopuffer::Models::FullTextSearchConfig, nil]
24
24
  optional :full_text_search, union: -> { Turbopuffer::FullTextSearch }
25
25
 
26
+ # @!attribute regex
27
+ # Whether to enable Regex filters on this attribute.
28
+ #
29
+ # @return [Boolean, nil]
30
+ optional :regex, Turbopuffer::Internal::Type::Boolean
31
+
26
32
  # @!attribute type
27
33
  # The data type of the attribute. Valid values: string, int, uint, uuid, datetime,
28
34
  # bool, []string, []int, []uint, []uuid, []datetime, [DIMS]f16, [DIMS]f32.
@@ -30,7 +36,7 @@ module Turbopuffer
30
36
  # @return [String, nil]
31
37
  optional :type, String
32
38
 
33
- # @!method initialize(ann: nil, filterable: nil, full_text_search: nil, type: nil)
39
+ # @!method initialize(ann: nil, filterable: nil, full_text_search: nil, regex: nil, type: nil)
34
40
  # Some parameter documentations has been truncated, see
35
41
  # {Turbopuffer::Models::AttributeSchemaConfig} for more details.
36
42
  #
@@ -42,6 +48,8 @@ module Turbopuffer
42
48
  #
43
49
  # @param full_text_search [Boolean, Turbopuffer::Models::FullTextSearchConfig] Whether this attribute can be used as part of a BM25 full-text search. Requires
44
50
  #
51
+ # @param regex [Boolean] Whether to enable Regex filters on this attribute.
52
+ #
45
53
  # @param type [String] The data type of the attribute. Valid values: string, int, uint, uuid, datetime,
46
54
  end
47
55
  end
@@ -298,7 +298,7 @@ module Turbopuffer
298
298
  path: ["v2/namespaces/%1$s", namespace],
299
299
  body: parsed,
300
300
  model: Turbopuffer::Models::NamespaceWriteResponse,
301
- options: options
301
+ options: {max_retries: 6, **options}
302
302
  )
303
303
  end
304
304
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Turbopuffer
4
- VERSION = "0.2.2"
4
+ VERSION = "0.2.3"
5
5
  end
@@ -2,11 +2,11 @@
2
2
 
3
3
  module Turbopuffer
4
4
  class Client < Turbopuffer::Internal::Transport::BaseClient
5
- DEFAULT_MAX_RETRIES = 2
5
+ DEFAULT_MAX_RETRIES = 4
6
6
 
7
7
  DEFAULT_TIMEOUT_IN_SECONDS = T.let(60.0, Float)
8
8
 
9
- DEFAULT_INITIAL_RETRY_DELAY = T.let(0.5, Float)
9
+ DEFAULT_INITIAL_RETRY_DELAY = T.let(0.3, Float)
10
10
 
11
11
  DEFAULT_MAX_RETRY_DELAY = T.let(8.0, Float)
12
12
 
@@ -41,6 +41,13 @@ module Turbopuffer
41
41
  end
42
42
  attr_writer :full_text_search
43
43
 
44
+ # Whether to enable Regex filters on this attribute.
45
+ sig { returns(T.nilable(T::Boolean)) }
46
+ attr_reader :regex
47
+
48
+ sig { params(regex: T::Boolean).void }
49
+ attr_writer :regex
50
+
44
51
  # The data type of the attribute. Valid values: string, int, uint, uuid, datetime,
45
52
  # bool, []string, []int, []uint, []uuid, []datetime, [DIMS]f16, [DIMS]f32.
46
53
  sig { returns(T.nilable(String)) }
@@ -56,6 +63,7 @@ module Turbopuffer
56
63
  filterable: T::Boolean,
57
64
  full_text_search:
58
65
  T.any(T::Boolean, Turbopuffer::FullTextSearchConfig::OrHash),
66
+ regex: T::Boolean,
59
67
  type: String
60
68
  ).returns(T.attached_class)
61
69
  end
@@ -68,6 +76,8 @@ module Turbopuffer
68
76
  # the `string` or `[]string` type, and by default, BM25-enabled attributes are not
69
77
  # filterable. You can override this by setting `filterable: true`.
70
78
  full_text_search: nil,
79
+ # Whether to enable Regex filters on this attribute.
80
+ regex: nil,
71
81
  # The data type of the attribute. Valid values: string, int, uint, uuid, datetime,
72
82
  # bool, []string, []int, []uint, []uuid, []datetime, [DIMS]f16, [DIMS]f32.
73
83
  type: nil
@@ -81,6 +91,7 @@ module Turbopuffer
81
91
  filterable: T::Boolean,
82
92
  full_text_search:
83
93
  T.any(T::Boolean, Turbopuffer::FullTextSearchConfig),
94
+ regex: T::Boolean,
84
95
  type: String
85
96
  }
86
97
  )
@@ -1,6 +1,6 @@
1
1
  module Turbopuffer
2
2
  class Client < Turbopuffer::Internal::Transport::BaseClient
3
- DEFAULT_MAX_RETRIES: 2
3
+ DEFAULT_MAX_RETRIES: 4
4
4
 
5
5
  DEFAULT_TIMEOUT_IN_SECONDS: Float
6
6
 
@@ -5,6 +5,7 @@ module Turbopuffer
5
5
  ann: bool,
6
6
  filterable: bool,
7
7
  full_text_search: Turbopuffer::Models::full_text_search,
8
+ regex: bool,
8
9
  type: String
9
10
  }
10
11
 
@@ -23,6 +24,10 @@ module Turbopuffer
23
24
  Turbopuffer::Models::full_text_search
24
25
  ) -> Turbopuffer::Models::full_text_search
25
26
 
27
+ attr_reader regex: bool?
28
+
29
+ def regex=: (bool) -> bool
30
+
26
31
  attr_reader type: String?
27
32
 
28
33
  def type=: (String) -> String
@@ -31,6 +36,7 @@ module Turbopuffer
31
36
  ?ann: bool,
32
37
  ?filterable: bool,
33
38
  ?full_text_search: Turbopuffer::Models::full_text_search,
39
+ ?regex: bool,
34
40
  ?type: String
35
41
  ) -> void
36
42
 
@@ -38,6 +44,7 @@ module Turbopuffer
38
44
  ann: bool,
39
45
  filterable: bool,
40
46
  full_text_search: Turbopuffer::Models::full_text_search,
47
+ regex: bool,
41
48
  type: String
42
49
  }
43
50
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turbopuffer-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Turbopuffer