searchkick 4.6.3 → 5.0.2

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.
@@ -1,5 +1,3 @@
1
- require "forwardable"
2
-
3
1
  module Searchkick
4
2
  class Results
5
3
  include Enumerable
@@ -19,13 +17,11 @@ module Searchkick
19
17
  @results ||= with_hit.map(&:first)
20
18
  end
21
19
 
22
- # TODO return enumerator like with_score
23
20
  def with_hit
24
- @with_hit ||= begin
25
- if missing_records.any?
26
- Searchkick.warn("Records in search index do not exist in database: #{missing_records.map { |v| v[:id] }.join(", ")}")
27
- end
28
- with_hit_and_missing_records[0]
21
+ return enum_for(:with_hit) unless block_given?
22
+
23
+ build_hits.each do |result|
24
+ yield result
29
25
  end
30
26
  end
31
27
 
@@ -145,7 +141,7 @@ module Searchkick
145
141
 
146
142
  def hits
147
143
  if error
148
- raise Searchkick::Error, "Query error - use the error method to view it"
144
+ raise Error, "Query error - use the error method to view it"
149
145
  else
150
146
  @response["hits"]["hits"]
151
147
  end
@@ -157,10 +153,11 @@ module Searchkick
157
153
  end
158
154
  end
159
155
 
160
- # TODO return enumerator like with_score
161
156
  def with_highlights(multiple: false)
162
- with_hit.map do |result, hit|
163
- [result, hit_highlights(hit, multiple: multiple)]
157
+ return enum_for(:with_highlights, multiple: multiple) unless block_given?
158
+
159
+ with_hit.each do |result, hit|
160
+ yield result, hit_highlights(hit, multiple: multiple)
164
161
  end
165
162
  end
166
163
 
@@ -181,7 +178,7 @@ module Searchkick
181
178
  end
182
179
 
183
180
  def scroll
184
- raise Searchkick::Error, "Pass `scroll` option to the search method for scrolling" unless scroll_id
181
+ raise Error, "Pass `scroll` option to the search method for scrolling" unless scroll_id
185
182
 
186
183
  if block_given?
187
184
  records = self
@@ -194,10 +191,10 @@ module Searchkick
194
191
  else
195
192
  begin
196
193
  # TODO Active Support notifications for this scroll call
197
- Searchkick::Results.new(@klass, Searchkick.client.scroll(scroll: options[:scroll], body: {scroll_id: scroll_id}), @options)
194
+ Results.new(@klass, Searchkick.client.scroll(scroll: options[:scroll], body: {scroll_id: scroll_id}), @options)
198
195
  rescue => e
199
196
  if Searchkick.not_found_error?(e) && e.message =~ /search_context_missing_exception/i
200
- raise Searchkick::Error, "Scroll id has expired"
197
+ raise Error, "Scroll id has expired"
201
198
  else
202
199
  raise e
203
200
  end
@@ -235,7 +232,7 @@ module Searchkick
235
232
  index_alias = index.split("_")[0..-2].join("_")
236
233
  Array((options[:index_mapping] || {})[index_alias])
237
234
  end
238
- raise Searchkick::Error, "Unknown model for index: #{index}. Pass the `models` option to the search method." unless models.any?
235
+ raise Error, "Unknown model for index: #{index}. Pass the `models` option to the search method." unless models.any?
239
236
  index_models[index] = models
240
237
  end
241
238
 
@@ -287,7 +284,7 @@ module Searchkick
287
284
  end
288
285
 
289
286
  if hit["highlight"] || options[:highlight]
290
- highlight = Hash[hit["highlight"].to_a.map { |k, v| [base_field(k), v.first] }]
287
+ highlight = hit["highlight"].to_a.to_h { |k, v| [base_field(k), v.first] }
291
288
  options[:highlighted_fields].map { |k| base_field(k) }.each do |k|
292
289
  result["highlighted_#{k}"] ||= (highlight[k] || result[k])
293
290
  end
@@ -302,23 +299,25 @@ module Searchkick
302
299
  end
303
300
  end
304
301
 
302
+ def build_hits
303
+ @build_hits ||= begin
304
+ if missing_records.any?
305
+ Searchkick.warn("Records in search index do not exist in database: #{missing_records.map { |v| v[:id] }.join(", ")}")
306
+ end
307
+ with_hit_and_missing_records[0]
308
+ end
309
+ end
310
+
305
311
  def results_query(records, hits)
312
+ records = Searchkick.scope(records)
313
+
306
314
  ids = hits.map { |hit| hit["_id"] }
307
315
  if options[:includes] || options[:model_includes]
308
316
  included_relations = []
309
317
  combine_includes(included_relations, options[:includes])
310
318
  combine_includes(included_relations, options[:model_includes][records]) if options[:model_includes]
311
319
 
312
- records =
313
- if defined?(NoBrainer::Document) && records < NoBrainer::Document
314
- if Gem.loaded_specs["nobrainer"].version >= Gem::Version.new("0.21")
315
- records.eager_load(included_relations)
316
- else
317
- records.preload(included_relations)
318
- end
319
- else
320
- records.includes(included_relations)
321
- end
320
+ records = records.includes(included_relations)
322
321
  end
323
322
 
324
323
  if options[:scope_results]
@@ -344,7 +343,7 @@ module Searchkick
344
343
 
345
344
  def hit_highlights(hit, multiple: false)
346
345
  if hit["highlight"]
347
- Hash[hit["highlight"].map { |k, v| [(options[:json] ? k : k.sub(/\.#{@options[:match_suffix]}\z/, "")).to_sym, multiple ? v : v.first] }]
346
+ hit["highlight"].to_h { |k, v| [(options[:json] ? k : k.sub(/\.#{@options[:match_suffix]}\z/, "")).to_sym, multiple ? v : v.first] }
348
347
  else
349
348
  {}
350
349
  end
@@ -1,3 +1,3 @@
1
1
  module Searchkick
2
- VERSION = "4.6.3"
2
+ VERSION = "5.0.2"
3
3
  end
data/lib/searchkick.rb CHANGED
@@ -1,29 +1,40 @@
1
1
  # dependencies
2
2
  require "active_support"
3
3
  require "active_support/core_ext/hash/deep_merge"
4
- require "elasticsearch"
4
+ require "active_support/core_ext/module/attr_internal"
5
+ require "active_support/core_ext/module/delegation"
6
+ require "active_support/notifications"
5
7
  require "hashie"
6
8
 
9
+ # stdlib
10
+ require "forwardable"
11
+
7
12
  # modules
8
- require "searchkick/bulk_indexer"
13
+ require "searchkick/controller_runtime"
9
14
  require "searchkick/index"
15
+ require "searchkick/index_cache"
16
+ require "searchkick/index_options"
10
17
  require "searchkick/indexer"
11
18
  require "searchkick/hash_wrapper"
12
- require "searchkick/middleware"
19
+ require "searchkick/log_subscriber"
13
20
  require "searchkick/model"
14
21
  require "searchkick/multi_search"
15
22
  require "searchkick/query"
16
23
  require "searchkick/reindex_queue"
17
24
  require "searchkick/record_data"
18
25
  require "searchkick/record_indexer"
26
+ require "searchkick/relation"
27
+ require "searchkick/relation_indexer"
19
28
  require "searchkick/results"
20
29
  require "searchkick/version"
21
30
 
22
31
  # integrations
23
32
  require "searchkick/railtie" if defined?(Rails)
24
- require "searchkick/logging" if defined?(ActiveSupport::Notifications)
25
33
 
26
34
  module Searchkick
35
+ # requires faraday
36
+ autoload :Middleware, "searchkick/middleware"
37
+
27
38
  # background jobs
28
39
  autoload :BulkReindexJob, "searchkick/bulk_reindex_job"
29
40
  autoload :ProcessBatchJob, "searchkick/process_batch_job"
@@ -33,19 +44,21 @@ module Searchkick
33
44
  # errors
34
45
  class Error < StandardError; end
35
46
  class MissingIndexError < Error; end
36
- class UnsupportedVersionError < Error; end
37
- # TODO switch to Error
38
- class InvalidQueryError < Elasticsearch::Transport::Transport::Errors::BadRequest; end
47
+ class UnsupportedVersionError < Error
48
+ def message
49
+ "This version of Searchkick requires Elasticsearch 7+ or OpenSearch 1+"
50
+ end
51
+ end
52
+ class InvalidQueryError < Error; end
39
53
  class DangerousOperation < Error; end
40
54
  class ImportError < Error; end
41
55
 
42
56
  class << self
43
- attr_accessor :search_method_name, :wordnet_path, :timeout, :models, :client_options, :redis, :index_prefix, :index_suffix, :queue_name, :model_options
57
+ attr_accessor :search_method_name, :timeout, :models, :client_options, :redis, :index_prefix, :index_suffix, :queue_name, :model_options, :client_type
44
58
  attr_writer :client, :env, :search_timeout
45
59
  attr_reader :aws_credentials
46
60
  end
47
61
  self.search_method_name = :search
48
- self.wordnet_path = "/var/lib/wn_s.pl"
49
62
  self.timeout = 10
50
63
  self.models = []
51
64
  self.client_options = {}
@@ -54,15 +67,45 @@ module Searchkick
54
67
 
55
68
  def self.client
56
69
  @client ||= begin
57
- require "typhoeus/adapters/faraday" if defined?(Typhoeus) && Gem::Version.new(Faraday::VERSION) < Gem::Version.new("0.14.0")
58
-
59
- Elasticsearch::Client.new({
60
- url: ENV["ELASTICSEARCH_URL"] || ENV["OPENSEARCH_URL"],
61
- transport_options: {request: {timeout: timeout}, headers: {content_type: "application/json"}},
62
- retry_on_failure: 2
63
- }.deep_merge(client_options)) do |f|
64
- f.use Searchkick::Middleware
65
- f.request signer_middleware_key, signer_middleware_aws_params if aws_credentials
70
+ client_type =
71
+ if self.client_type
72
+ self.client_type
73
+ elsif defined?(OpenSearch::Client) && defined?(Elasticsearch::Client)
74
+ raise Error, "Multiple clients found - set Searchkick.client_type = :elasticsearch or :opensearch"
75
+ elsif defined?(OpenSearch::Client)
76
+ :opensearch
77
+ elsif defined?(Elasticsearch::Client)
78
+ :elasticsearch
79
+ else
80
+ raise Error, "No client found - install the `elasticsearch` or `opensearch-ruby` gem"
81
+ end
82
+
83
+ # check after client to ensure faraday is installed
84
+ # TODO remove in Searchkick 6
85
+ if defined?(Typhoeus) && Gem::Version.new(Faraday::VERSION) < Gem::Version.new("0.14.0")
86
+ require "typhoeus/adapters/faraday"
87
+ end
88
+
89
+ if client_type == :opensearch
90
+ OpenSearch::Client.new({
91
+ url: ENV["OPENSEARCH_URL"],
92
+ transport_options: {request: {timeout: timeout}, headers: {content_type: "application/json"}},
93
+ retry_on_failure: 2
94
+ }.deep_merge(client_options)) do |f|
95
+ f.use Searchkick::Middleware
96
+ f.request :aws_sigv4, signer_middleware_aws_params if aws_credentials
97
+ end
98
+ else
99
+ raise Error, "The `elasticsearch` gem must be 7+" if Elasticsearch::VERSION.to_i < 7
100
+
101
+ Elasticsearch::Client.new({
102
+ url: ENV["ELASTICSEARCH_URL"],
103
+ transport_options: {request: {timeout: timeout}, headers: {content_type: "application/json"}},
104
+ retry_on_failure: 2
105
+ }.deep_merge(client_options)) do |f|
106
+ f.use Searchkick::Middleware
107
+ f.request :aws_sigv4, signer_middleware_aws_params if aws_credentials
108
+ end
66
109
  end
67
110
  end
68
111
  end
@@ -96,14 +139,6 @@ module Searchkick
96
139
  Gem::Version.new(server_version.split("-")[0]) < Gem::Version.new(version.split("-")[0])
97
140
  end
98
141
 
99
- # memoize for performance
100
- def self.server_below7?
101
- unless defined?(@server_below7)
102
- @server_below7 = server_below?("7.0.0")
103
- end
104
- @server_below7
105
- end
106
-
107
142
  def self.search(term = "*", model: nil, **options, &block)
108
143
  options = options.dup
109
144
  klass = model
@@ -129,17 +164,27 @@ module Searchkick
129
164
  end
130
165
  end
131
166
 
132
- options = options.merge(block: block) if block
133
- query = Searchkick::Query.new(klass, term, **options)
167
+ # TODO remove in Searchkick 6
134
168
  if options[:execute] == false
135
- query
136
- else
137
- query.execute
169
+ Searchkick.warn("The execute option is no longer needed")
170
+ options.delete(:execute)
138
171
  end
172
+
173
+ options = options.merge(block: block) if block
174
+ Relation.new(klass, term, **options)
139
175
  end
140
176
 
141
177
  def self.multi_search(queries)
142
- Searchkick::MultiSearch.new(queries).perform
178
+ return if queries.empty?
179
+
180
+ queries = queries.map { |q| q.send(:query) }
181
+ event = {
182
+ name: "Multi Search",
183
+ body: queries.flat_map { |q| [q.params.except(:body).to_json, q.body.to_json] }.map { |v| "#{v}\n" }.join,
184
+ }
185
+ ActiveSupport::Notifications.instrument("multi_search.searchkick", event) do
186
+ MultiSearch.new(queries).perform
187
+ end
143
188
  end
144
189
 
145
190
  # callbacks
@@ -160,13 +205,25 @@ module Searchkick
160
205
  end
161
206
  end
162
207
 
163
- def self.callbacks(value = nil)
208
+ # message is private
209
+ def self.callbacks(value = nil, message: nil)
164
210
  if block_given?
165
211
  previous_value = callbacks_value
166
212
  begin
167
213
  self.callbacks_value = value
168
214
  result = yield
169
- indexer.perform if callbacks_value == :bulk
215
+ if callbacks_value == :bulk && indexer.queued_items.any?
216
+ event = {}
217
+ if message
218
+ message.call(event)
219
+ else
220
+ event[:name] = "Bulk"
221
+ event[:count] = indexer.queued_items.size
222
+ end
223
+ ActiveSupport::Notifications.instrument("request.searchkick", event) do
224
+ indexer.perform
225
+ end
226
+ end
170
227
  result
171
228
  ensure
172
229
  self.callbacks_value = previous_value
@@ -177,27 +234,22 @@ module Searchkick
177
234
  end
178
235
 
179
236
  def self.aws_credentials=(creds)
180
- begin
181
- # TODO remove in Searchkick 5 (just use aws_sigv4)
182
- require "faraday_middleware/aws_signers_v4"
183
- rescue LoadError
184
- require "faraday_middleware/aws_sigv4"
185
- end
237
+ require "faraday_middleware/aws_sigv4"
238
+
186
239
  @aws_credentials = creds
187
240
  @client = nil # reset client
188
241
  end
189
242
 
190
243
  def self.reindex_status(index_name)
191
- raise Searchkick::Error, "Redis not configured" unless redis
244
+ raise Error, "Redis not configured" unless redis
192
245
 
193
- batches_left = Searchkick::Index.new(index_name).batches_left
246
+ batches_left = Index.new(index_name).batches_left
194
247
  {
195
248
  completed: batches_left == 0,
196
249
  batches_left: batches_left
197
250
  }
198
251
  end
199
252
 
200
- # TODO use ConnectionPool::Wrapper when redis is set so this is no longer needed
201
253
  def self.with_redis
202
254
  if redis
203
255
  if redis.respond_to?(:with)
@@ -215,29 +267,41 @@ module Searchkick
215
267
  end
216
268
 
217
269
  # private
218
- def self.load_records(records, ids)
219
- records =
220
- if records.respond_to?(:primary_key)
221
- # ActiveRecord
222
- records.where(records.primary_key => ids) if records.primary_key
223
- elsif records.respond_to?(:queryable)
224
- # Mongoid 3+
225
- records.queryable.for_ids(ids)
226
- elsif records.respond_to?(:unscoped) && :id.respond_to?(:in)
227
- # Nobrainer
228
- records.unscoped.where(:id.in => ids)
229
- elsif records.respond_to?(:key_column_names)
230
- records.where(records.key_column_names.first => ids)
270
+ def self.load_records(relation, ids)
271
+ relation =
272
+ if relation.respond_to?(:primary_key)
273
+ primary_key = relation.primary_key
274
+ raise Error, "Need primary key to load records" if !primary_key
275
+
276
+ relation.where(primary_key => ids)
277
+ elsif relation.respond_to?(:queryable)
278
+ relation.queryable.for_ids(ids)
231
279
  end
232
280
 
233
- raise Searchkick::Error, "Not sure how to load records" if !records
281
+ raise Error, "Not sure how to load records" if !relation
282
+
283
+ relation
284
+ end
234
285
 
235
- records
286
+ # private
287
+ def self.load_model(class_name, allow_child: false)
288
+ model = class_name.safe_constantize
289
+ raise Error, "Could not find class: #{class_name}" unless model
290
+ if allow_child
291
+ unless model.respond_to?(:searchkick_klass)
292
+ raise Error, "#{class_name} is not a searchkick model"
293
+ end
294
+ else
295
+ unless Searchkick.models.include?(model)
296
+ raise Error, "#{class_name} is not a searchkick model"
297
+ end
298
+ end
299
+ model
236
300
  end
237
301
 
238
302
  # private
239
303
  def self.indexer
240
- Thread.current[:searchkick_indexer] ||= Searchkick::Indexer.new
304
+ Thread.current[:searchkick_indexer] ||= Indexer.new
241
305
  end
242
306
 
243
307
  # private
@@ -250,22 +314,9 @@ module Searchkick
250
314
  Thread.current[:searchkick_callbacks_enabled] = value
251
315
  end
252
316
 
253
- # private
254
- def self.signer_middleware_key
255
- defined?(FaradayMiddleware::AwsSignersV4) ? :aws_signers_v4 : :aws_sigv4
256
- end
257
-
258
317
  # private
259
318
  def self.signer_middleware_aws_params
260
- if signer_middleware_key == :aws_sigv4
261
- {service: "es", region: "us-east-1"}.merge(aws_credentials)
262
- else
263
- {
264
- credentials: aws_credentials[:credentials] || Aws::Credentials.new(aws_credentials[:access_key_id], aws_credentials[:secret_access_key]),
265
- service_name: "es",
266
- region: aws_credentials[:region] || "us-east-1"
267
- }
268
- end
319
+ {service: "es", region: "us-east-1"}.merge(aws_credentials)
269
320
  end
270
321
 
271
322
  # private
@@ -275,31 +326,55 @@ module Searchkick
275
326
  def self.relation?(klass)
276
327
  if klass.respond_to?(:current_scope)
277
328
  !klass.current_scope.nil?
278
- elsif defined?(Mongoid::Threaded)
279
- !Mongoid::Threaded.current_scope(klass).nil?
329
+ else
330
+ klass.is_a?(Mongoid::Criteria) || !Mongoid::Threaded.current_scope(klass).nil?
331
+ end
332
+ end
333
+
334
+ # private
335
+ def self.scope(model)
336
+ # safety check to make sure used properly in code
337
+ raise Error, "Cannot scope relation" if relation?(model)
338
+
339
+ if model.searchkick_options[:unscope]
340
+ model.unscoped
341
+ else
342
+ model
280
343
  end
281
344
  end
282
345
 
283
346
  # private
284
347
  def self.not_found_error?(e)
285
- (defined?(Elasticsearch) && e.is_a?(Elasticsearch::Transport::Transport::Errors::NotFound)) ||
348
+ (defined?(Elastic::Transport) && e.is_a?(Elastic::Transport::Transport::Errors::NotFound)) ||
349
+ (defined?(Elasticsearch::Transport) && e.is_a?(Elasticsearch::Transport::Transport::Errors::NotFound)) ||
286
350
  (defined?(OpenSearch) && e.is_a?(OpenSearch::Transport::Transport::Errors::NotFound))
287
351
  end
288
352
 
289
353
  # private
290
354
  def self.transport_error?(e)
291
- (defined?(Elasticsearch) && e.is_a?(Elasticsearch::Transport::Transport::Error)) ||
355
+ (defined?(Elastic::Transport) && e.is_a?(Elastic::Transport::Transport::Error)) ||
356
+ (defined?(Elasticsearch::Transport) && e.is_a?(Elasticsearch::Transport::Transport::Error)) ||
292
357
  (defined?(OpenSearch) && e.is_a?(OpenSearch::Transport::Transport::Error))
293
358
  end
294
- end
295
359
 
296
- require "active_model/callbacks"
297
- ActiveModel::Callbacks.include(Searchkick::Model)
298
- # TODO use
299
- # ActiveSupport.on_load(:mongoid) do
300
- # Mongoid::Document::ClassMethods.include Searchkick::Model
301
- # end
360
+ # private
361
+ def self.not_allowed_error?(e)
362
+ (defined?(Elastic::Transport) && e.is_a?(Elastic::Transport::Transport::Errors::MethodNotAllowed)) ||
363
+ (defined?(Elasticsearch::Transport) && e.is_a?(Elasticsearch::Transport::Transport::Errors::MethodNotAllowed)) ||
364
+ (defined?(OpenSearch) && e.is_a?(OpenSearch::Transport::Transport::Errors::MethodNotAllowed))
365
+ end
366
+ end
302
367
 
303
368
  ActiveSupport.on_load(:active_record) do
304
369
  extend Searchkick::Model
305
370
  end
371
+
372
+ ActiveSupport.on_load(:mongoid) do
373
+ Mongoid::Document::ClassMethods.include Searchkick::Model
374
+ end
375
+
376
+ ActiveSupport.on_load(:action_controller) do
377
+ include Searchkick::ControllerRuntime
378
+ end
379
+
380
+ Searchkick::LogSubscriber.attach_to :searchkick
@@ -4,9 +4,12 @@ namespace :searchkick do
4
4
  class_name = ENV["CLASS"]
5
5
  abort "USAGE: rake searchkick:reindex CLASS=Product" unless class_name
6
6
 
7
- model = class_name.safe_constantize
8
- abort "Could not find class: #{class_name}" unless model
9
- abort "#{class_name} is not a searchkick model" unless Searchkick.models.include?(model)
7
+ model =
8
+ begin
9
+ Searchkick.load_model(class_name)
10
+ rescue Searchkick::Error => e
11
+ abort e.message
12
+ end
10
13
 
11
14
  puts "Reindexing #{model.name}..."
12
15
  model.reindex
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: 4.6.3
4
+ version: 5.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-19 00:00:00.000000000 Z
11
+ date: 2022-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -16,34 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '5'
19
+ version: '5.2'
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'
27
- - !ruby/object:Gem::Dependency
28
- name: elasticsearch
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '6'
34
- - - "<"
35
- - !ruby/object:Gem::Version
36
- version: '7.14'
37
- type: :runtime
38
- prerelease: false
39
- version_requirements: !ruby/object:Gem::Requirement
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- version: '6'
44
- - - "<"
45
- - !ruby/object:Gem::Version
46
- version: '7.14'
26
+ version: '5.2'
47
27
  - !ruby/object:Gem::Dependency
48
28
  name: hashie
49
29
  requirement: !ruby/object:Gem::Requirement
@@ -68,13 +48,14 @@ files:
68
48
  - LICENSE.txt
69
49
  - README.md
70
50
  - lib/searchkick.rb
71
- - lib/searchkick/bulk_indexer.rb
72
51
  - lib/searchkick/bulk_reindex_job.rb
52
+ - lib/searchkick/controller_runtime.rb
73
53
  - lib/searchkick/hash_wrapper.rb
74
54
  - lib/searchkick/index.rb
55
+ - lib/searchkick/index_cache.rb
75
56
  - lib/searchkick/index_options.rb
76
57
  - lib/searchkick/indexer.rb
77
- - lib/searchkick/logging.rb
58
+ - lib/searchkick/log_subscriber.rb
78
59
  - lib/searchkick/middleware.rb
79
60
  - lib/searchkick/model.rb
80
61
  - lib/searchkick/multi_search.rb
@@ -86,6 +67,8 @@ files:
86
67
  - lib/searchkick/record_indexer.rb
87
68
  - lib/searchkick/reindex_queue.rb
88
69
  - lib/searchkick/reindex_v2_job.rb
70
+ - lib/searchkick/relation.rb
71
+ - lib/searchkick/relation_indexer.rb
89
72
  - lib/searchkick/results.rb
90
73
  - lib/searchkick/version.rb
91
74
  - lib/tasks/searchkick.rake
@@ -101,14 +84,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
101
84
  requirements:
102
85
  - - ">="
103
86
  - !ruby/object:Gem::Version
104
- version: '2.4'
87
+ version: '2.6'
105
88
  required_rubygems_version: !ruby/object:Gem::Requirement
106
89
  requirements:
107
90
  - - ">="
108
91
  - !ruby/object:Gem::Version
109
92
  version: '0'
110
93
  requirements: []
111
- rubygems_version: 3.2.22
94
+ rubygems_version: 3.3.3
112
95
  signing_key:
113
96
  specification_version: 4
114
97
  summary: Intelligent search made easy with Rails and Elasticsearch or OpenSearch