turbopuffer 1.7.0 → 1.8.0

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: e86efb79e86d8d7b74b0139e810bef55805bae162b9fab4eed29be9425e104e9
4
- data.tar.gz: d4f37a4e3fb10f033a476546319f5dc2238f741d1485eb5917758e50dba8d3cd
3
+ metadata.gz: 1ce140f383cd214d319532393b102253c791f6d02d2ab1bed260839f6cf3c4da
4
+ data.tar.gz: bded1cc386ff2225788fd6fc94260e082c2616bb26acec3786409dbdd4ee6b48
5
5
  SHA512:
6
- metadata.gz: c86bfa585e8c3ca4fe60de6df7b69bf39152ca8f23b6cde8a6bfa8e4fa25c5c6581e504d4dc9de8a9091ed0e045bfb00478006e4016266976f241af985d33421
7
- data.tar.gz: a8bd49b7edd37e4eb795bd0fb1cd75dfdfa090f4e63fe8b06eede5d3ea2e69bf3060b2a89ba17093f474c9ae6d9cde5684285af4fbc0cc5397a3957bbc5a2fb6
6
+ metadata.gz: 57e5843be79fdb247ffa70c955991330e45e653892faf18fd4482aefddb286fc971e87e12fdbf34b4a7fa6a1288618ae7aa8694002647793a4961293d9b52c38
7
+ data.tar.gz: be47597ec9e7d65fbad2e73b641873ad238ead54f44ea0e0605655cba114b28831560bb3f13986861db9654c72578d2ebdac03612fea289cbfbaf4236b63028c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.8.0 (2025-11-25)
4
+
5
+ Full Changelog: [v1.7.0...v1.8.0](https://github.com/turbopuffer/turbopuffer-ruby/compare/v1.7.0...v1.8.0)
6
+
7
+ ### Features
8
+
9
+ * site: add ascii_folding to docs and SDKs ([3559081](https://github.com/turbopuffer/turbopuffer-ruby/commit/3559081d051884e7ce9b926cd87cedcdda4f8d31))
10
+
11
+
12
+ ### Chores
13
+
14
+ * explicitly require "base64" gem ([eff4748](https://github.com/turbopuffer/turbopuffer-ruby/commit/eff47486ca1e5fa6742cd3f40a17822f2499429a))
15
+
3
16
  ## 1.7.0 (2025-11-17)
4
17
 
5
18
  Full Changelog: [v1.6.0...v1.7.0](https://github.com/turbopuffer/turbopuffer-ruby/compare/v1.6.0...v1.7.0)
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", "~> 1.7.0"
20
+ gem "turbopuffer", "~> 1.8.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -3,6 +3,13 @@
3
3
  module Turbopuffer
4
4
  module Models
5
5
  class FullTextSearchConfig < Turbopuffer::Internal::Type::BaseModel
6
+ # @!attribute ascii_folding
7
+ # Whether to convert each non-ASCII character in a token to its ASCII equivalent,
8
+ # if one exists (e.g., à -> a). Defaults to `false` (i.e., no folding).
9
+ #
10
+ # @return [Boolean, nil]
11
+ optional :ascii_folding, Turbopuffer::Internal::Type::Boolean
12
+
6
13
  # @!attribute b
7
14
  # The `b` document length normalization parameter for BM25. Defaults to `0.75`.
8
15
  #
@@ -57,12 +64,14 @@ module Turbopuffer
57
64
  # @return [Symbol, Turbopuffer::Models::Tokenizer, nil]
58
65
  optional :tokenizer, enum: -> { Turbopuffer::Tokenizer }
59
66
 
60
- # @!method initialize(b: nil, case_sensitive: nil, k1: nil, language: nil, max_token_length: nil, remove_stopwords: nil, stemming: nil, tokenizer: nil)
67
+ # @!method initialize(ascii_folding: nil, b: nil, case_sensitive: nil, k1: nil, language: nil, max_token_length: nil, remove_stopwords: nil, stemming: nil, tokenizer: nil)
61
68
  # Some parameter documentations has been truncated, see
62
69
  # {Turbopuffer::Models::FullTextSearchConfig} for more details.
63
70
  #
64
71
  # Configuration options for full-text search.
65
72
  #
73
+ # @param ascii_folding [Boolean] Whether to convert each non-ASCII character in a token to its ASCII equivalent,
74
+ #
66
75
  # @param b [Float] The `b` document length normalization parameter for BM25. Defaults to `0.75`.
67
76
  #
68
77
  # @param case_sensitive [Boolean] Whether searching is case-sensitive. Defaults to `false` (i.e. case-insensitive)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Turbopuffer
4
- VERSION = "1.7.0"
4
+ VERSION = "1.8.0"
5
5
  end
data/lib/turbopuffer.rb CHANGED
@@ -3,6 +3,7 @@
3
3
  # Standard libraries.
4
4
  # rubocop:disable Lint/RedundantRequireStatement
5
5
  require "English"
6
+ require "base64"
6
7
  require "cgi"
7
8
  require "date"
8
9
  require "erb"
data/manifest.yaml CHANGED
@@ -1,5 +1,6 @@
1
1
  dependencies:
2
2
  - English
3
+ - base64
3
4
  - cgi
4
5
  - date
5
6
  - erb
@@ -11,6 +11,14 @@ module Turbopuffer
11
11
  )
12
12
  end
13
13
 
14
+ # Whether to convert each non-ASCII character in a token to its ASCII equivalent,
15
+ # if one exists (e.g., à -> a). Defaults to `false` (i.e., no folding).
16
+ sig { returns(T.nilable(T::Boolean)) }
17
+ attr_reader :ascii_folding
18
+
19
+ sig { params(ascii_folding: T::Boolean).void }
20
+ attr_writer :ascii_folding
21
+
14
22
  # The `b` document length normalization parameter for BM25. Defaults to `0.75`.
15
23
  sig { returns(T.nilable(Float)) }
16
24
  attr_reader :b
@@ -76,6 +84,7 @@ module Turbopuffer
76
84
  # Configuration options for full-text search.
77
85
  sig do
78
86
  params(
87
+ ascii_folding: T::Boolean,
79
88
  b: Float,
80
89
  case_sensitive: T::Boolean,
81
90
  k1: Float,
@@ -87,6 +96,9 @@ module Turbopuffer
87
96
  ).returns(T.attached_class)
88
97
  end
89
98
  def self.new(
99
+ # Whether to convert each non-ASCII character in a token to its ASCII equivalent,
100
+ # if one exists (e.g., à -> a). Defaults to `false` (i.e., no folding).
101
+ ascii_folding: nil,
90
102
  # The `b` document length normalization parameter for BM25. Defaults to `0.75`.
91
103
  b: nil,
92
104
  # Whether searching is case-sensitive. Defaults to `false` (i.e.
@@ -115,6 +127,7 @@ module Turbopuffer
115
127
  sig do
116
128
  override.returns(
117
129
  {
130
+ ascii_folding: T::Boolean,
118
131
  b: Float,
119
132
  case_sensitive: T::Boolean,
120
133
  k1: Float,
@@ -2,6 +2,7 @@ module Turbopuffer
2
2
  module Models
3
3
  type full_text_search_config =
4
4
  {
5
+ ascii_folding: bool,
5
6
  b: Float,
6
7
  case_sensitive: bool,
7
8
  :k1 => Float,
@@ -13,6 +14,10 @@ module Turbopuffer
13
14
  }
14
15
 
15
16
  class FullTextSearchConfig < Turbopuffer::Internal::Type::BaseModel
17
+ attr_reader ascii_folding: bool?
18
+
19
+ def ascii_folding=: (bool) -> bool
20
+
16
21
  attr_reader b: Float?
17
22
 
18
23
  def b=: (Float) -> Float
@@ -50,6 +55,7 @@ module Turbopuffer
50
55
  ) -> Turbopuffer::Models::tokenizer
51
56
 
52
57
  def initialize: (
58
+ ?ascii_folding: bool,
53
59
  ?b: Float,
54
60
  ?case_sensitive: bool,
55
61
  ?k1: Float,
@@ -61,6 +67,7 @@ module Turbopuffer
61
67
  ) -> void
62
68
 
63
69
  def to_hash: -> {
70
+ ascii_folding: bool,
64
71
  b: Float,
65
72
  case_sensitive: bool,
66
73
  :k1 => Float,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turbopuffer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Turbopuffer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-11-17 00:00:00.000000000 Z
11
+ date: 2025-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool