searchkick 5.2.4 → 5.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 21860cb96c0df2e5aaa2a4c57b7ec78bb383e404f6c7a623304b3d1817f117fe
4
- data.tar.gz: 69affa981018bd79094296e8093015ca94acce0017183e1def525f9950e178a8
3
+ metadata.gz: 8646c1e2b5f827947bc43c6d9f3761a3050007d67c8d051a3e70014700148c17
4
+ data.tar.gz: 23d8ab0656e1f2cbaf11aeffedd99ed3b9991271248c2bddc5bf6150cfdfff2c
5
5
  SHA512:
6
- metadata.gz: 977224b7e841cb83c2e6fb0108a1fc48099798e5a5b9c6f9cf5039b61f6b6c99cacb2f965f6e5ae0cff1606c71be7f2e3ab691bfddd32c65a3b1dacaeec4baeb
7
- data.tar.gz: 36e2864035ce71be03db3a7fb7ffba11e29fda396943c42452c17505ef7376a8dcb569d840f08a1540d4c97aec2028792dcae10cf588f1959c4c5d6d7d6f2081
6
+ metadata.gz: 13fa0dd9d4c0fa8f77368403b0a9f717eaf5bcfd714022bcdd23400161ef8939baf7803f3a0773cf6848b6deea9ad46b9e9a67e50871cab07911e4a16f171775
7
+ data.tar.gz: bb2da50a0761be5e90074896c8c020aa7568a3483579bfa0743101199ef20b370b7b0cf3235818c86e69b6e4438cf05e67643a1a192715b5c952253411912dab
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## 5.3.1 (2023-11-28)
2
+
3
+ - Fixed error with misspellings below and failed queries
4
+
5
+ ## 5.3.0 (2023-07-02)
6
+
7
+ - Fixed error with `cutoff_frequency`
8
+ - Dropped support for Ruby < 3 and Active Record < 6.1
9
+ - Dropped support for Mongoid < 7
10
+
1
11
  ## 5.2.4 (2023-05-11)
2
12
 
3
13
  - Fixed error with non-string routing and `:async` mode
data/README.md CHANGED
@@ -1483,7 +1483,15 @@ ENV["ELASTICSEARCH_URL"] = "https://user:password@host1,https://user:password@ho
1483
1483
  ENV["OPENSEARCH_URL"] = "https://user:password@host1,https://user:password@host2"
1484
1484
  ```
1485
1485
 
1486
- See [elastic-transport](https://github.com/elastic/elastic-transport-ruby) or [opensearch-transport](https://github.com/opensearch-project/opensearch-ruby/tree/main/opensearch-transport) for a complete list of options.
1486
+ ### Client Options
1487
+
1488
+ Create an initializer with:
1489
+
1490
+ ```ruby
1491
+ Searchkick.client_options[:reload_connections] = true
1492
+ ```
1493
+
1494
+ See the docs for [Elasticsearch](https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/advanced-config.html) or [Opensearch](https://rubydoc.info/gems/opensearch-transport#configuration) for a complete list of options.
1487
1495
 
1488
1496
  ### Lograge
1489
1497
 
@@ -191,7 +191,7 @@ module Searchkick
191
191
  end
192
192
 
193
193
  def retry_misspellings?(response)
194
- @misspellings_below && Results.new(searchkick_klass, response).total_count < @misspellings_below
194
+ @misspellings_below && response["error"].nil? && Results.new(searchkick_klass, response).total_count < @misspellings_below
195
195
  end
196
196
 
197
197
  private
@@ -373,7 +373,7 @@ module Searchkick
373
373
  field_misspellings = misspellings && (!misspellings_fields || misspellings_fields.include?(base_field(field)))
374
374
 
375
375
  if field == "_all" || field.end_with?(".analyzed")
376
- shared_options[:cutoff_frequency] = 0.001 unless operator.to_s == "and" || field_misspellings == false || (!below73? && !track_total_hits?)
376
+ shared_options[:cutoff_frequency] = 0.001 unless operator.to_s == "and" || field_misspellings == false || (!below73? && !track_total_hits?) || match_type == :match_phrase || !below80? || Searchkick.opensearch?
377
377
  qs << shared_options.merge(analyzer: "searchkick_search")
378
378
 
379
379
  # searchkick_search and searchkick_search2 are the same for some languages
@@ -1170,5 +1170,9 @@ module Searchkick
1170
1170
  def below710?
1171
1171
  Searchkick.server_below?("7.10.0")
1172
1172
  end
1173
+
1174
+ def below80?
1175
+ Searchkick.server_below?("8.0.0")
1176
+ end
1173
1177
  end
1174
1178
  end
@@ -1,3 +1,3 @@
1
1
  module Searchkick
2
- VERSION = "5.2.4"
2
+ VERSION = "5.3.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: searchkick
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.4
4
+ version: 5.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-12 00:00:00.000000000 Z
11
+ date: 2023-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '5.2'
19
+ version: '6.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '5.2'
26
+ version: '6.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: hashie
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -85,7 +85,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - ">="
87
87
  - !ruby/object:Gem::Version
88
- version: '2.6'
88
+ version: '3'
89
89
  required_rubygems_version: !ruby/object:Gem::Requirement
90
90
  requirements:
91
91
  - - ">="