turbopuffer-ruby 0.2.1 → 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: f74d6f24c603153315a8058ef7d2e3de69d0e67cc8826e67dd11b99b21ca3f78
4
- data.tar.gz: a93a4d2debfde1e1d0b50ab1f88a1183ae63059e807926f78bb00a0832e80954
3
+ metadata.gz: 5b1e5ee7c731fa9997237ad7f6d925613aa81d2e648db8fb45ea5e57a5c2ffa4
4
+ data.tar.gz: 5a290b29f1a20db2a0662d80905d1ec67ec7aaaeed1fc12ee75cbe4442c33ebe
5
5
  SHA512:
6
- metadata.gz: dce1477f36f20639b896b23f7bd3ff288a1b7f48b1a72de98118f773e0ff48c45cbda88eed2fdc6c511e4e5f0f96a75513171d5591a25da4ed362ad6ad737195
7
- data.tar.gz: c3122f443bdde73ae799e2451f2c74a3b23a89a85623c97029cc21f9fa6910b216a241f792181756d2a6b0ed70b578b516cae45d8748f721b808fe0c5a953a4f
6
+ metadata.gz: 74f87502fe4f218c32eb90940633c289eb11259086d2c361e3b37aa5211a082eb002448ab45ace5b49d1c10800061bbe85948b6a7fdef56ca98234f8ea3f3aac
7
+ data.tar.gz: e7ed69482a28c867bf5efc807151e50cbbe504a2cf5b1f10bf8ff5c9c9b6591d0ad579106e75b4df1db5c13b380c578c930391bddf357e033b4d6b02b92b3c50
data/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
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
+
12
+ ## 0.2.2 (2025-07-29)
13
+
14
+ Full Changelog: [v0.2.1...v0.2.2](https://github.com/turbopuffer/turbopuffer-ruby/compare/v0.2.1...v0.2.2)
15
+
16
+ ### Bug Fixes
17
+
18
+ * **api:** api update ([9650229](https://github.com/turbopuffer/turbopuffer-ruby/commit/965022936b5551d035ccba9dceb98f7b180ed34d))
19
+ * **api:** api update ([f27319a](https://github.com/turbopuffer/turbopuffer-ruby/commit/f27319a7f811a5f6975acbb2d714c113f32fb8e8))
20
+ * **internal:** ensure sorbet test always runs serially ([954ee15](https://github.com/turbopuffer/turbopuffer-ruby/commit/954ee1533f161a7da823cd98077edb0d7bb4b750))
21
+
3
22
  ## 0.2.1 (2025-07-28)
4
23
 
5
24
  Full Changelog: [v0.2.0...v0.2.1](https://github.com/turbopuffer/turbopuffer-ruby/compare/v0.2.0...v0.2.1)
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.1"
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
@@ -10,6 +10,12 @@ module Turbopuffer
10
10
  # @return [Integer]
11
11
  required :approx_logical_bytes, Integer
12
12
 
13
+ # @!attribute approx_row_count
14
+ # The approximate number of rows in the namespace.
15
+ #
16
+ # @return [Integer]
17
+ required :approx_row_count, Integer
18
+
13
19
  # @!attribute created_at
14
20
  # The timestamp when the namespace was created.
15
21
  #
@@ -22,11 +28,13 @@ module Turbopuffer
22
28
  # @return [Hash{Symbol=>Turbopuffer::Models::AttributeSchemaConfig}]
23
29
  required :schema, -> { Turbopuffer::Internal::Type::HashOf[Turbopuffer::AttributeSchemaConfig] }
24
30
 
25
- # @!method initialize(approx_logical_bytes:, created_at:, schema:)
31
+ # @!method initialize(approx_logical_bytes:, approx_row_count:, created_at:, schema:)
26
32
  # Metadata about a namespace.
27
33
  #
28
34
  # @param approx_logical_bytes [Integer] The approximate number of logical bytes in the namespace.
29
35
  #
36
+ # @param approx_row_count [Integer] The approximate number of rows in the namespace.
37
+ #
30
38
  # @param created_at [Time] The timestamp when the namespace was created.
31
39
  #
32
40
  # @param schema [Hash{Symbol=>Turbopuffer::Models::AttributeSchemaConfig}] The schema of the namespace.
@@ -31,6 +31,13 @@ module Turbopuffer
31
31
  # @return [Symbol, Turbopuffer::Models::DistanceMetric, nil]
32
32
  optional :distance_metric, enum: -> { Turbopuffer::DistanceMetric }
33
33
 
34
+ # @!attribute exclude_attributes
35
+ # List of attribute names to exclude from the response. All other attributes will
36
+ # be included in the response.
37
+ #
38
+ # @return [Array<String>, nil]
39
+ optional :exclude_attributes, Turbopuffer::Internal::Type::ArrayOf[String]
40
+
34
41
  # @!attribute filters
35
42
  # Exact filters for attributes to refine search results for. Think of it as a SQL
36
43
  # WHERE clause.
@@ -62,7 +69,7 @@ module Turbopuffer
62
69
  # @return [Symbol, Turbopuffer::Models::VectorEncoding, nil]
63
70
  optional :vector_encoding, enum: -> { Turbopuffer::VectorEncoding }
64
71
 
65
- # @!method initialize(namespace: nil, aggregate_by: nil, consistency: nil, distance_metric: nil, filters: nil, include_attributes: nil, rank_by: nil, top_k: nil, vector_encoding: nil, request_options: {})
72
+ # @!method initialize(namespace: nil, aggregate_by: nil, consistency: nil, distance_metric: nil, exclude_attributes: nil, filters: nil, include_attributes: nil, rank_by: nil, top_k: nil, vector_encoding: nil, request_options: {})
66
73
  # Some parameter documentations has been truncated, see
67
74
  # {Turbopuffer::Models::NamespaceQueryParams} for more details.
68
75
  #
@@ -74,6 +81,8 @@ module Turbopuffer
74
81
  #
75
82
  # @param distance_metric [Symbol, Turbopuffer::Models::DistanceMetric] A function used to calculate vector similarity.
76
83
  #
84
+ # @param exclude_attributes [Array<String>] List of attribute names to exclude from the response. All other attributes will
85
+ #
77
86
  # @param filters [Object] Exact filters for attributes to refine search results for. Think of it as a SQL
78
87
  #
79
88
  # @param include_attributes [Boolean, Array<String>] Whether to include attributes in the response.
@@ -16,6 +16,13 @@ module Turbopuffer
16
16
  # @return [Symbol, Turbopuffer::Models::DistanceMetric, nil]
17
17
  optional :distance_metric, enum: -> { Turbopuffer::DistanceMetric }
18
18
 
19
+ # @!attribute exclude_attributes
20
+ # List of attribute names to exclude from the response. All other attributes will
21
+ # be included in the response.
22
+ #
23
+ # @return [Array<String>, nil]
24
+ optional :exclude_attributes, Turbopuffer::Internal::Type::ArrayOf[String]
25
+
19
26
  # @!attribute filters
20
27
  # Exact filters for attributes to refine search results for. Think of it as a SQL
21
28
  # WHERE clause.
@@ -41,7 +48,7 @@ module Turbopuffer
41
48
  # @return [Integer, nil]
42
49
  optional :top_k, Integer
43
50
 
44
- # @!method initialize(aggregate_by: nil, distance_metric: nil, filters: nil, include_attributes: nil, rank_by: nil, top_k: nil)
51
+ # @!method initialize(aggregate_by: nil, distance_metric: nil, exclude_attributes: nil, filters: nil, include_attributes: nil, rank_by: nil, top_k: nil)
45
52
  # Some parameter documentations has been truncated, see
46
53
  # {Turbopuffer::Models::Query} for more details.
47
54
  #
@@ -51,6 +58,8 @@ module Turbopuffer
51
58
  #
52
59
  # @param distance_metric [Symbol, Turbopuffer::Models::DistanceMetric] A function used to calculate vector similarity.
53
60
  #
61
+ # @param exclude_attributes [Array<String>] List of attribute names to exclude from the response. All other attributes will
62
+ #
54
63
  # @param filters [Object] Exact filters for attributes to refine search results for. Think of it as a SQL
55
64
  #
56
65
  # @param include_attributes [Boolean, Array<String>] Whether to include attributes in the response.
@@ -115,7 +115,7 @@ module Turbopuffer
115
115
  #
116
116
  # Query, filter, full-text search and vector search documents.
117
117
  #
118
- # @overload query(namespace: nil, aggregate_by: nil, consistency: nil, distance_metric: nil, filters: nil, include_attributes: nil, rank_by: nil, top_k: nil, vector_encoding: nil, request_options: {})
118
+ # @overload query(namespace: nil, aggregate_by: nil, consistency: nil, distance_metric: nil, exclude_attributes: nil, filters: nil, include_attributes: nil, rank_by: nil, top_k: nil, vector_encoding: nil, request_options: {})
119
119
  #
120
120
  # @param namespace [String] Path param: The name of the namespace.
121
121
  #
@@ -125,6 +125,8 @@ module Turbopuffer
125
125
  #
126
126
  # @param distance_metric [Symbol, Turbopuffer::Models::DistanceMetric] Body param: A function used to calculate vector similarity.
127
127
  #
128
+ # @param exclude_attributes [Array<String>] Body param: List of attribute names to exclude from the response. All other attr
129
+ #
128
130
  # @param filters [Object] Body param: Exact filters for attributes to refine search results for. Think of
129
131
  #
130
132
  # @param include_attributes [Boolean, Array<String>] Body param: Whether to include attributes in the response.
@@ -296,7 +298,7 @@ module Turbopuffer
296
298
  path: ["v2/namespaces/%1$s", namespace],
297
299
  body: parsed,
298
300
  model: Turbopuffer::Models::NamespaceWriteResponse,
299
- options: options
301
+ options: {max_retries: 6, **options}
300
302
  )
301
303
  end
302
304
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Turbopuffer
4
- VERSION = "0.2.1"
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
  )
@@ -12,6 +12,10 @@ module Turbopuffer
12
12
  sig { returns(Integer) }
13
13
  attr_accessor :approx_logical_bytes
14
14
 
15
+ # The approximate number of rows in the namespace.
16
+ sig { returns(Integer) }
17
+ attr_accessor :approx_row_count
18
+
15
19
  # The timestamp when the namespace was created.
16
20
  sig { returns(Time) }
17
21
  attr_accessor :created_at
@@ -24,6 +28,7 @@ module Turbopuffer
24
28
  sig do
25
29
  params(
26
30
  approx_logical_bytes: Integer,
31
+ approx_row_count: Integer,
27
32
  created_at: Time,
28
33
  schema: T::Hash[Symbol, Turbopuffer::AttributeSchemaConfig::OrHash]
29
34
  ).returns(T.attached_class)
@@ -31,6 +36,8 @@ module Turbopuffer
31
36
  def self.new(
32
37
  # The approximate number of logical bytes in the namespace.
33
38
  approx_logical_bytes:,
39
+ # The approximate number of rows in the namespace.
40
+ approx_row_count:,
34
41
  # The timestamp when the namespace was created.
35
42
  created_at:,
36
43
  # The schema of the namespace.
@@ -42,6 +49,7 @@ module Turbopuffer
42
49
  override.returns(
43
50
  {
44
51
  approx_logical_bytes: Integer,
52
+ approx_row_count: Integer,
45
53
  created_at: Time,
46
54
  schema: T::Hash[Symbol, Turbopuffer::AttributeSchemaConfig]
47
55
  }
@@ -48,6 +48,14 @@ module Turbopuffer
48
48
  end
49
49
  attr_writer :distance_metric
50
50
 
51
+ # List of attribute names to exclude from the response. All other attributes will
52
+ # be included in the response.
53
+ sig { returns(T.nilable(T::Array[String])) }
54
+ attr_reader :exclude_attributes
55
+
56
+ sig { params(exclude_attributes: T::Array[String]).void }
57
+ attr_writer :exclude_attributes
58
+
51
59
  # Exact filters for attributes to refine search results for. Think of it as a SQL
52
60
  # WHERE clause.
53
61
  sig { returns(T.nilable(T.anything)) }
@@ -96,6 +104,7 @@ module Turbopuffer
96
104
  aggregate_by: T::Hash[Symbol, T.anything],
97
105
  consistency: Turbopuffer::NamespaceQueryParams::Consistency::OrHash,
98
106
  distance_metric: Turbopuffer::DistanceMetric::OrSymbol,
107
+ exclude_attributes: T::Array[String],
99
108
  filters: T.anything,
100
109
  include_attributes: Turbopuffer::IncludeAttributes::Variants,
101
110
  rank_by: T.anything,
@@ -113,6 +122,9 @@ module Turbopuffer
113
122
  consistency: nil,
114
123
  # A function used to calculate vector similarity.
115
124
  distance_metric: nil,
125
+ # List of attribute names to exclude from the response. All other attributes will
126
+ # be included in the response.
127
+ exclude_attributes: nil,
116
128
  # Exact filters for attributes to refine search results for. Think of it as a SQL
117
129
  # WHERE clause.
118
130
  filters: nil,
@@ -135,6 +147,7 @@ module Turbopuffer
135
147
  aggregate_by: T::Hash[Symbol, T.anything],
136
148
  consistency: Turbopuffer::NamespaceQueryParams::Consistency,
137
149
  distance_metric: Turbopuffer::DistanceMetric::OrSymbol,
150
+ exclude_attributes: T::Array[String],
138
151
  filters: T.anything,
139
152
  include_attributes: Turbopuffer::IncludeAttributes::Variants,
140
153
  rank_by: T.anything,
@@ -25,6 +25,14 @@ module Turbopuffer
25
25
  end
26
26
  attr_writer :distance_metric
27
27
 
28
+ # List of attribute names to exclude from the response. All other attributes will
29
+ # be included in the response.
30
+ sig { returns(T.nilable(T::Array[String])) }
31
+ attr_reader :exclude_attributes
32
+
33
+ sig { params(exclude_attributes: T::Array[String]).void }
34
+ attr_writer :exclude_attributes
35
+
28
36
  # Exact filters for attributes to refine search results for. Think of it as a SQL
29
37
  # WHERE clause.
30
38
  sig { returns(T.nilable(T.anything)) }
@@ -63,6 +71,7 @@ module Turbopuffer
63
71
  params(
64
72
  aggregate_by: T::Hash[Symbol, T.anything],
65
73
  distance_metric: Turbopuffer::DistanceMetric::OrSymbol,
74
+ exclude_attributes: T::Array[String],
66
75
  filters: T.anything,
67
76
  include_attributes: Turbopuffer::IncludeAttributes::Variants,
68
77
  rank_by: T.anything,
@@ -75,6 +84,9 @@ module Turbopuffer
75
84
  aggregate_by: nil,
76
85
  # A function used to calculate vector similarity.
77
86
  distance_metric: nil,
87
+ # List of attribute names to exclude from the response. All other attributes will
88
+ # be included in the response.
89
+ exclude_attributes: nil,
78
90
  # Exact filters for attributes to refine search results for. Think of it as a SQL
79
91
  # WHERE clause.
80
92
  filters: nil,
@@ -92,6 +104,7 @@ module Turbopuffer
92
104
  {
93
105
  aggregate_by: T::Hash[Symbol, T.anything],
94
106
  distance_metric: Turbopuffer::DistanceMetric::OrSymbol,
107
+ exclude_attributes: T::Array[String],
95
108
  filters: T.anything,
96
109
  include_attributes: Turbopuffer::IncludeAttributes::Variants,
97
110
  rank_by: T.anything,
@@ -76,6 +76,7 @@ module Turbopuffer
76
76
  aggregate_by: T::Hash[Symbol, T.anything],
77
77
  consistency: Turbopuffer::NamespaceQueryParams::Consistency::OrHash,
78
78
  distance_metric: Turbopuffer::DistanceMetric::OrSymbol,
79
+ exclude_attributes: T::Array[String],
79
80
  filters: T.anything,
80
81
  include_attributes: Turbopuffer::IncludeAttributes::Variants,
81
82
  rank_by: T.anything,
@@ -94,6 +95,9 @@ module Turbopuffer
94
95
  consistency: nil,
95
96
  # Body param: A function used to calculate vector similarity.
96
97
  distance_metric: nil,
98
+ # Body param: List of attribute names to exclude from the response. All other
99
+ # attributes will be included in the response.
100
+ exclude_attributes: nil,
97
101
  # Body param: Exact filters for attributes to refine search results for. Think of
98
102
  # it as a SQL WHERE clause.
99
103
  filters: nil,
@@ -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
@@ -3,6 +3,7 @@ module Turbopuffer
3
3
  type namespace_metadata =
4
4
  {
5
5
  approx_logical_bytes: Integer,
6
+ approx_row_count: Integer,
6
7
  created_at: Time,
7
8
  schema: ::Hash[Symbol, Turbopuffer::AttributeSchemaConfig]
8
9
  }
@@ -10,18 +11,22 @@ module Turbopuffer
10
11
  class NamespaceMetadata < Turbopuffer::Internal::Type::BaseModel
11
12
  attr_accessor approx_logical_bytes: Integer
12
13
 
14
+ attr_accessor approx_row_count: Integer
15
+
13
16
  attr_accessor created_at: Time
14
17
 
15
18
  attr_accessor schema: ::Hash[Symbol, Turbopuffer::AttributeSchemaConfig]
16
19
 
17
20
  def initialize: (
18
21
  approx_logical_bytes: Integer,
22
+ approx_row_count: Integer,
19
23
  created_at: Time,
20
24
  schema: ::Hash[Symbol, Turbopuffer::AttributeSchemaConfig]
21
25
  ) -> void
22
26
 
23
27
  def to_hash: -> {
24
28
  approx_logical_bytes: Integer,
29
+ approx_row_count: Integer,
25
30
  created_at: Time,
26
31
  schema: ::Hash[Symbol, Turbopuffer::AttributeSchemaConfig]
27
32
  }
@@ -6,6 +6,7 @@ module Turbopuffer
6
6
  aggregate_by: ::Hash[Symbol, top],
7
7
  consistency: Turbopuffer::NamespaceQueryParams::Consistency,
8
8
  distance_metric: Turbopuffer::Models::distance_metric,
9
+ exclude_attributes: ::Array[String],
9
10
  filters: top,
10
11
  include_attributes: Turbopuffer::Models::include_attributes,
11
12
  rank_by: top,
@@ -38,6 +39,10 @@ module Turbopuffer
38
39
  Turbopuffer::Models::distance_metric
39
40
  ) -> Turbopuffer::Models::distance_metric
40
41
 
42
+ attr_reader exclude_attributes: ::Array[String]?
43
+
44
+ def exclude_attributes=: (::Array[String]) -> ::Array[String]
45
+
41
46
  attr_reader filters: top?
42
47
 
43
48
  def filters=: (top) -> top
@@ -67,6 +72,7 @@ module Turbopuffer
67
72
  ?aggregate_by: ::Hash[Symbol, top],
68
73
  ?consistency: Turbopuffer::NamespaceQueryParams::Consistency,
69
74
  ?distance_metric: Turbopuffer::Models::distance_metric,
75
+ ?exclude_attributes: ::Array[String],
70
76
  ?filters: top,
71
77
  ?include_attributes: Turbopuffer::Models::include_attributes,
72
78
  ?rank_by: top,
@@ -80,6 +86,7 @@ module Turbopuffer
80
86
  aggregate_by: ::Hash[Symbol, top],
81
87
  consistency: Turbopuffer::NamespaceQueryParams::Consistency,
82
88
  distance_metric: Turbopuffer::Models::distance_metric,
89
+ exclude_attributes: ::Array[String],
83
90
  filters: top,
84
91
  include_attributes: Turbopuffer::Models::include_attributes,
85
92
  rank_by: top,
@@ -4,6 +4,7 @@ module Turbopuffer
4
4
  {
5
5
  aggregate_by: ::Hash[Symbol, top],
6
6
  distance_metric: Turbopuffer::Models::distance_metric,
7
+ exclude_attributes: ::Array[String],
7
8
  filters: top,
8
9
  include_attributes: Turbopuffer::Models::include_attributes,
9
10
  rank_by: top,
@@ -21,6 +22,10 @@ module Turbopuffer
21
22
  Turbopuffer::Models::distance_metric
22
23
  ) -> Turbopuffer::Models::distance_metric
23
24
 
25
+ attr_reader exclude_attributes: ::Array[String]?
26
+
27
+ def exclude_attributes=: (::Array[String]) -> ::Array[String]
28
+
24
29
  attr_reader filters: top?
25
30
 
26
31
  def filters=: (top) -> top
@@ -42,6 +47,7 @@ module Turbopuffer
42
47
  def initialize: (
43
48
  ?aggregate_by: ::Hash[Symbol, top],
44
49
  ?distance_metric: Turbopuffer::Models::distance_metric,
50
+ ?exclude_attributes: ::Array[String],
45
51
  ?filters: top,
46
52
  ?include_attributes: Turbopuffer::Models::include_attributes,
47
53
  ?rank_by: top,
@@ -51,6 +57,7 @@ module Turbopuffer
51
57
  def to_hash: -> {
52
58
  aggregate_by: ::Hash[Symbol, top],
53
59
  distance_metric: Turbopuffer::Models::distance_metric,
60
+ exclude_attributes: ::Array[String],
54
61
  filters: top,
55
62
  include_attributes: Turbopuffer::Models::include_attributes,
56
63
  rank_by: top,
@@ -29,6 +29,7 @@ module Turbopuffer
29
29
  ?aggregate_by: ::Hash[Symbol, top],
30
30
  ?consistency: Turbopuffer::NamespaceQueryParams::Consistency,
31
31
  ?distance_metric: Turbopuffer::Models::distance_metric,
32
+ ?exclude_attributes: ::Array[String],
32
33
  ?filters: top,
33
34
  ?include_attributes: Turbopuffer::Models::include_attributes,
34
35
  ?rank_by: top,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turbopuffer-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Turbopuffer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-07-28 00:00:00.000000000 Z
11
+ date: 2025-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool