searchkick 5.2.1 → 5.2.3

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: cd5ad80ede7109fee3886bc0e5c27b8f2e4a39ed9530ac3a0c4683d8281dcd7c
4
- data.tar.gz: 41c8736fc385b97d14ee1f0aef72cd8fbefad6d171dae879066901af5481fef1
3
+ metadata.gz: 41df7b8613c98e6677a942277671253d5ee467d27c01f4524baa88a5785227d3
4
+ data.tar.gz: 2867126c284db2a126ee1603604794efa4481f0db5ccd4c49e7601a3e7537c08
5
5
  SHA512:
6
- metadata.gz: a8dd0e09fe48cc48e240d295fd350734bfe787e06611a5f3637e4b9d7e81afa327ea42fbe5912024c06bbe6de55ecbb41ecac57d98d6194bf7d94e34d89eb39c
7
- data.tar.gz: ba98108eda0e4cb2d3884e3402246ad2c269a11438d6eb62ee2346b2cbfe6dd2c4e2865df5ed52bfef6faf3dbc031dc4ca3d6aefb0c5d7487b347b496bd3b29e
6
+ metadata.gz: ff62e6f39b917dec85128d05cec8e846fdcd8ca2dc59f40f4ac73d135688d06d93233e58185aceb981eb295da1f2a27a8b845e1f7827114b28fd3daf9c741e90
7
+ data.tar.gz: 629b8b0a6d544b33fc5c7dd75e72738983e1c2515316994ef052429eeca0f3980e674caa1c86a375147530dd44a2ff87ff28e2b9031f63270ec10f7a24e10e9c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 5.2.3 (2023-04-12)
2
+
3
+ - Fixed error with missing records and multiple models
4
+
5
+ ## 5.2.2 (2023-04-01)
6
+
7
+ - Fixed `total_docs` method
8
+ - Fixed deprecation warning with Active Support 7.1
9
+
1
10
  ## 5.2.1 (2023-02-21)
2
11
 
3
12
  - Added support for `redis-client` gem
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2013-2021 Andrew Kane
1
+ Copyright (c) 2013-2023 Andrew Kane
2
2
 
3
3
  MIT License
4
4
 
@@ -67,7 +67,8 @@ module Searchkick
67
67
  index: name,
68
68
  body: {
69
69
  query: {match_all: {}},
70
- size: 0
70
+ size: 0,
71
+ track_total_hits: true
71
72
  }
72
73
  )
73
74
 
@@ -31,7 +31,7 @@ module Searchkick
31
31
  params << "#{CGI.escape(k.to_s)}=#{CGI.escape(v.to_s)}"
32
32
  end
33
33
 
34
- debug " #{color(name, YELLOW, true)} #{index}#{type ? "/#{type.join(',')}" : ''}/_search#{params.any? ? '?' + params.join('&') : nil} #{payload[:query][:body].to_json}"
34
+ debug " #{color(name, YELLOW, bold: true)} #{index}#{type ? "/#{type.join(',')}" : ''}/_search#{params.any? ? '?' + params.join('&') : nil} #{payload[:query][:body].to_json}"
35
35
  end
36
36
 
37
37
  def request(event)
@@ -41,7 +41,7 @@ module Searchkick
41
41
  payload = event.payload
42
42
  name = "#{payload[:name]} (#{event.duration.round(1)}ms)"
43
43
 
44
- debug " #{color(name, YELLOW, true)} #{payload.except(:name).to_json}"
44
+ debug " #{color(name, YELLOW, bold: true)} #{payload.except(:name).to_json}"
45
45
  end
46
46
 
47
47
  def multi_search(event)
@@ -51,7 +51,7 @@ module Searchkick
51
51
  payload = event.payload
52
52
  name = "#{payload[:name]} (#{event.duration.round(1)}ms)"
53
53
 
54
- debug " #{color(name, YELLOW, true)} _msearch #{payload[:body]}"
54
+ debug " #{color(name, YELLOW, bold: true)} _msearch #{payload[:body]}"
55
55
  end
56
56
  end
57
57
  end
@@ -304,7 +304,7 @@ module Searchkick
304
304
  def build_hits
305
305
  @build_hits ||= begin
306
306
  if missing_records.any?
307
- Searchkick.warn("Records in search index do not exist in database: #{missing_records.map { |v| "#{v[:model].model_name} #{v[:id]}" }.join(", ")}")
307
+ Searchkick.warn("Records in search index do not exist in database: #{missing_records.map { |v| "#{Array(v[:model]).map(&:model_name).sort.join("/")} #{v[:id]}" }.join(", ")}")
308
308
  end
309
309
  with_hit_and_missing_records[0]
310
310
  end
@@ -1,3 +1,3 @@
1
1
  module Searchkick
2
- VERSION = "5.2.1"
2
+ VERSION = "5.2.3"
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.1
4
+ version: 5.2.3
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-02-22 00:00:00.000000000 Z
11
+ date: 2023-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
92
  - !ruby/object:Gem::Version
93
93
  version: '0'
94
94
  requirements: []
95
- rubygems_version: 3.4.6
95
+ rubygems_version: 3.4.10
96
96
  signing_key:
97
97
  specification_version: 4
98
98
  summary: Intelligent search made easy with Rails and Elasticsearch or OpenSearch