searchkick 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +60 -23
- data/lib/searchkick.rb +8 -5
- data/lib/searchkick/logging.rb +45 -1
- data/lib/searchkick/model.rb +17 -6
- data/lib/searchkick/query.rb +5 -4
- data/lib/searchkick/reindex.rb +11 -0
- data/lib/searchkick/reindex_job.rb +28 -0
- data/lib/searchkick/version.rb +1 -1
- data/searchkick.gemspec +2 -2
- data/test/autocomplete_test.rb +1 -1
- data/test/boost_test.rb +1 -1
- data/test/facets_test.rb +1 -1
- data/test/highlight_test.rb +1 -1
- data/test/index_test.rb +1 -1
- data/test/inheritance_test.rb +1 -1
- data/test/match_test.rb +1 -1
- data/test/model_test.rb +1 -1
- data/test/query_test.rb +1 -1
- data/test/reindex_job_test.rb +33 -0
- data/test/should_index_test.rb +1 -1
- data/test/similar_test.rb +1 -1
- data/test/sql_test.rb +1 -1
- data/test/suggest_test.rb +1 -1
- data/test/synonyms_test.rb +6 -1
- data/test/test_helper.rb +8 -2
- metadata +11 -9
- data/lib/searchkick/search.rb +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 647df0215d082ec2eed37cabd3f1949aafc6c058
|
4
|
+
data.tar.gz: b3be78d876de64f7323fe31fbbe7829f7885ebc4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9326c663870b3dcf60384515ec29873a9b7c3ce6325922e3250ee0c7f75ebd933859d1a481275d035f2a8e00ac2b5c55ee0d342dfd55e698b575ca947f781f93
|
7
|
+
data.tar.gz: e6aaaa85a4ee9ccea8dba7bbd3077aef5164be1a5381ea60e1716881035050505575e1190494f9e53c1bef92b89852050b587a3fe3d84b4b35019eb9c8364ba8
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## 0.8.2
|
2
|
+
|
3
|
+
- Added `async` to `callbacks` option
|
4
|
+
- Added `wordnet` option
|
5
|
+
- Added `edit_distance` option to eventually replace `distance` option
|
6
|
+
- Catch misspelling of `misspellings` option
|
7
|
+
- Improved logging
|
8
|
+
|
1
9
|
## 0.8.1
|
2
10
|
|
3
11
|
- Added `search_method_name` option
|
data/README.md
CHANGED
@@ -243,6 +243,27 @@ end
|
|
243
243
|
|
244
244
|
Call `Product.reindex` after changing synonyms.
|
245
245
|
|
246
|
+
### WordNet
|
247
|
+
|
248
|
+
Prepopulate English synonyms with the [WordNet database](http://en.wikipedia.org/wiki/WordNet).
|
249
|
+
|
250
|
+
Download [WordNet 3.0](http://wordnetcode.princeton.edu/3.0/WNprolog-3.0.tar.gz) to each Elasticsearch server and move `wn_s.pl` to the `/var/lib` directory.
|
251
|
+
|
252
|
+
```sh
|
253
|
+
cd /tmp
|
254
|
+
curl -o wordnet.tar.gz http://wordnetcode.princeton.edu/3.0/WNprolog-3.0.tar.gz
|
255
|
+
tar -zxvf wordnet.tar.gz
|
256
|
+
mv prolog/wn_s.pl /var/lib
|
257
|
+
```
|
258
|
+
|
259
|
+
Tell each model to use it:
|
260
|
+
|
261
|
+
```ruby
|
262
|
+
class Product < ActiveRecord::Base
|
263
|
+
searchkick wordnet: true
|
264
|
+
end
|
265
|
+
```
|
266
|
+
|
246
267
|
### Misspellings
|
247
268
|
|
248
269
|
By default, Searchkick handles misspelled queries by returning results with an [edit distance](http://en.wikipedia.org/wiki/Levenshtein_distance) of one. To turn off this feature, use:
|
@@ -254,7 +275,7 @@ Product.search "zuchini", misspellings: false # no zucchini
|
|
254
275
|
You can also change the edit distance with:
|
255
276
|
|
256
277
|
```ruby
|
257
|
-
Product.search "zucini", misspellings: {
|
278
|
+
Product.search "zucini", misspellings: {edit_distance: 2} # zucchini
|
258
279
|
```
|
259
280
|
|
260
281
|
### Indexing
|
@@ -303,7 +324,36 @@ end
|
|
303
324
|
#### No need to reindex
|
304
325
|
|
305
326
|
- App starts
|
306
|
-
|
327
|
+
|
328
|
+
### Stay Synced
|
329
|
+
|
330
|
+
There are three strategies for keeping the index synced with your database.
|
331
|
+
|
332
|
+
1. Immediate (default)
|
333
|
+
|
334
|
+
Anytime a record is inserted, updated, or deleted
|
335
|
+
|
336
|
+
2. Asynchronous
|
337
|
+
|
338
|
+
Use background jobs for better performance
|
339
|
+
|
340
|
+
```ruby
|
341
|
+
class Product < ActiveRecord::Base
|
342
|
+
searchkick callbacks: :async
|
343
|
+
end
|
344
|
+
```
|
345
|
+
|
346
|
+
Supports [Delayed Job](https://github.com/collectiveidea/delayed_job) only at the moment
|
347
|
+
|
348
|
+
3. Manual
|
349
|
+
|
350
|
+
Turn off automatic syncing
|
351
|
+
|
352
|
+
```ruby
|
353
|
+
class Product < ActiveRecord::Base
|
354
|
+
searchkick callbacks: false
|
355
|
+
end
|
356
|
+
```
|
307
357
|
|
308
358
|
### Keep Getting Better
|
309
359
|
|
@@ -742,15 +792,7 @@ class Product < ActiveRecord::Base
|
|
742
792
|
end
|
743
793
|
```
|
744
794
|
|
745
|
-
Turn off callbacks
|
746
|
-
|
747
|
-
```ruby
|
748
|
-
class Product < ActiveRecord::Base
|
749
|
-
searchkick callbacks: false
|
750
|
-
end
|
751
|
-
```
|
752
|
-
|
753
|
-
or temporarily
|
795
|
+
Turn off callbacks temporarily
|
754
796
|
|
755
797
|
```ruby
|
756
798
|
Product.disable_search_callbacks # or use Searchkick.disable_callbacks for all models
|
@@ -794,25 +836,20 @@ class Product < ActiveRecord::Base
|
|
794
836
|
end
|
795
837
|
```
|
796
838
|
|
797
|
-
|
839
|
+
Reindex asynchronously
|
798
840
|
|
799
841
|
```ruby
|
800
842
|
class Product < ActiveRecord::Base
|
801
843
|
searchkick callbacks: false
|
802
844
|
|
803
|
-
# add the callbacks manually
|
804
|
-
|
805
|
-
# ActiveRecord - one callback
|
806
|
-
after_commit :reindex_async
|
807
|
-
|
808
|
-
# Mongoid - two callbacks
|
809
|
-
after_save :reindex_async
|
810
|
-
after_destroy :reindex_async
|
811
|
-
|
812
845
|
def reindex_async
|
813
|
-
#
|
814
|
-
delay.reindex
|
846
|
+
# custom code to reindex
|
815
847
|
end
|
848
|
+
|
849
|
+
after_commit :reindex_async
|
850
|
+
# or for Mongoid
|
851
|
+
# after_save :reindex_async
|
852
|
+
# after_destroy :reindex_async
|
816
853
|
end
|
817
854
|
```
|
818
855
|
|
data/lib/searchkick.rb
CHANGED
@@ -7,6 +7,7 @@ require "searchkick/reindex"
|
|
7
7
|
require "searchkick/results"
|
8
8
|
require "searchkick/query"
|
9
9
|
require "searchkick/similar"
|
10
|
+
require "searchkick/reindex_job"
|
10
11
|
require "searchkick/model"
|
11
12
|
require "searchkick/tasks"
|
12
13
|
require "searchkick/logging" if defined?(Rails)
|
@@ -17,9 +18,13 @@ module Searchkick
|
|
17
18
|
class InvalidQueryError < Elasticsearch::Transport::Transport::Errors::BadRequest; end
|
18
19
|
|
19
20
|
class << self
|
21
|
+
attr_accessor :callbacks
|
20
22
|
attr_accessor :search_method_name
|
23
|
+
attr_accessor :wordnet_path
|
21
24
|
end
|
25
|
+
self.callbacks = true
|
22
26
|
self.search_method_name = :search
|
27
|
+
self.wordnet_path = "/var/lib/wn_s.pl"
|
23
28
|
|
24
29
|
def self.client
|
25
30
|
@client ||= Elasticsearch::Client.new(url: ENV["ELASTICSEARCH_URL"])
|
@@ -33,18 +38,16 @@ module Searchkick
|
|
33
38
|
@server_version ||= client.info["version"]["number"]
|
34
39
|
end
|
35
40
|
|
36
|
-
@callbacks = true
|
37
|
-
|
38
41
|
def self.enable_callbacks
|
39
|
-
|
42
|
+
self.callbacks = true
|
40
43
|
end
|
41
44
|
|
42
45
|
def self.disable_callbacks
|
43
|
-
|
46
|
+
self.callbacks = false
|
44
47
|
end
|
45
48
|
|
46
49
|
def self.callbacks?
|
47
|
-
|
50
|
+
callbacks
|
48
51
|
end
|
49
52
|
end
|
50
53
|
|
data/lib/searchkick/logging.rb
CHANGED
@@ -11,10 +11,44 @@ module Searchkick
|
|
11
11
|
execute_without_instrumentation
|
12
12
|
end
|
13
13
|
end
|
14
|
-
|
15
14
|
alias_method_chain :execute, :instrumentation
|
16
15
|
end
|
17
16
|
|
17
|
+
class Index
|
18
|
+
def store_with_instrumentation(record)
|
19
|
+
event = {
|
20
|
+
name: "#{record.searchkick_klass.name} Store",
|
21
|
+
id: search_id(record)
|
22
|
+
}
|
23
|
+
ActiveSupport::Notifications.instrument("request.searchkick", event) do
|
24
|
+
store_without_instrumentation(record)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
alias_method_chain :store, :instrumentation
|
28
|
+
|
29
|
+
def remove_with_instrumentation(record)
|
30
|
+
event = {
|
31
|
+
name: "#{record.searchkick_klass.name} Remove",
|
32
|
+
id: search_id(record)
|
33
|
+
}
|
34
|
+
ActiveSupport::Notifications.instrument("request.searchkick", event) do
|
35
|
+
remove_without_instrumentation(record)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
alias_method_chain :remove, :instrumentation
|
39
|
+
|
40
|
+
def import_with_instrumentation(records)
|
41
|
+
event = {
|
42
|
+
name: "#{records.first.searchkick_klass.name} Import",
|
43
|
+
count: records.size
|
44
|
+
}
|
45
|
+
ActiveSupport::Notifications.instrument("request.searchkick", event) do
|
46
|
+
import_without_instrumentation(records)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
alias_method_chain :import, :instrumentation
|
50
|
+
end
|
51
|
+
|
18
52
|
# https://github.com/rails/rails/blob/master/activerecord/lib/active_record/log_subscriber.rb
|
19
53
|
class LogSubscriber < ActiveSupport::LogSubscriber
|
20
54
|
def self.runtime=(value)
|
@@ -43,6 +77,16 @@ module Searchkick
|
|
43
77
|
host = Searchkick.client.transport.hosts.first
|
44
78
|
debug " #{color(name, YELLOW, true)} curl #{host[:protocol]}://#{host[:host]}:#{host[:port]}/#{CGI.escape(index)}#{type ? "/#{type.map{|t| CGI.escape(t) }.join(",")}" : ""}/_search?pretty -d '#{payload[:query][:body].to_json}'"
|
45
79
|
end
|
80
|
+
|
81
|
+
def request(event)
|
82
|
+
self.class.runtime += event.duration
|
83
|
+
return unless logger.debug?
|
84
|
+
|
85
|
+
payload = event.payload
|
86
|
+
name = "#{payload[:name]} (#{event.duration.round(1)}ms)"
|
87
|
+
|
88
|
+
debug " #{color(name, YELLOW, true)} #{payload.except(:name).to_json}"
|
89
|
+
end
|
46
90
|
end
|
47
91
|
|
48
92
|
# https://github.com/rails/rails/blob/master/activerecord/lib/active_record/railties/controller_runtime.rb
|
data/lib/searchkick/model.rb
CHANGED
@@ -7,10 +7,12 @@ module Searchkick
|
|
7
7
|
class_eval do
|
8
8
|
cattr_reader :searchkick_options, :searchkick_env, :searchkick_klass
|
9
9
|
|
10
|
+
callbacks = options.has_key?(:callbacks) ? options[:callbacks] : true
|
11
|
+
|
10
12
|
class_variable_set :@@searchkick_options, options.dup
|
11
13
|
class_variable_set :@@searchkick_env, ENV["RACK_ENV"] || ENV["RAILS_ENV"] || "development"
|
12
14
|
class_variable_set :@@searchkick_klass, self
|
13
|
-
class_variable_set :@@searchkick_callbacks,
|
15
|
+
class_variable_set :@@searchkick_callbacks, callbacks
|
14
16
|
class_variable_set :@@searchkick_index, options[:index_name] || [options[:index_prefix], model_name.plural, searchkick_env].compact.join("_")
|
15
17
|
|
16
18
|
def self.searchkick_index
|
@@ -30,11 +32,20 @@ module Searchkick
|
|
30
32
|
extend Searchkick::Reindex
|
31
33
|
include Searchkick::Similar
|
32
34
|
|
33
|
-
if
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
35
|
+
if callbacks == :async
|
36
|
+
def reindex_async
|
37
|
+
Delayed::Job.enqueue Searchkick::ReindexJob.new(self.class.name, id)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
if callbacks
|
42
|
+
callback_name = callbacks == :async ? :reindex_async : :reindex
|
43
|
+
if respond_to?(:after_commit)
|
44
|
+
after_commit callback_name, if: proc{ self.class.search_callbacks? }
|
45
|
+
else
|
46
|
+
after_save callback_name, if: proc{ self.class.search_callbacks? }
|
47
|
+
after_destroy callback_name, if: proc{ self.class.search_callbacks? }
|
48
|
+
end
|
38
49
|
end
|
39
50
|
|
40
51
|
def self.enable_search_callbacks
|
data/lib/searchkick/query.rb
CHANGED
@@ -102,11 +102,12 @@ module Searchkick
|
|
102
102
|
shared_options.merge(boost: 10 * factor, analyzer: "searchkick_search"),
|
103
103
|
shared_options.merge(boost: 10 * factor, analyzer: "searchkick_search2")
|
104
104
|
]
|
105
|
-
|
106
|
-
|
105
|
+
misspellings = options.has_key?(:misspellings) ? options[:misspellings] : options[:mispellings] # why not?
|
106
|
+
if misspellings != false
|
107
|
+
edit_distance = (misspellings.is_a?(Hash) && (misspellings[:edit_distance] || misspellings[:distance])) || 1
|
107
108
|
qs.concat [
|
108
|
-
shared_options.merge(fuzziness:
|
109
|
-
shared_options.merge(fuzziness:
|
109
|
+
shared_options.merge(fuzziness: edit_distance, max_expansions: 3, analyzer: "searchkick_search"),
|
110
|
+
shared_options.merge(fuzziness: edit_distance, max_expansions: 3, analyzer: "searchkick_search2")
|
110
111
|
]
|
111
112
|
end
|
112
113
|
elsif field.end_with?(".exact")
|
data/lib/searchkick/reindex.rb
CHANGED
@@ -230,6 +230,17 @@ module Searchkick
|
|
230
230
|
settings[:analysis][:analyzer][:default_index][:filter] << "searchkick_synonym"
|
231
231
|
end
|
232
232
|
|
233
|
+
if options[:wordnet]
|
234
|
+
settings[:analysis][:filter][:searchkick_wordnet] = {
|
235
|
+
type: "synonym",
|
236
|
+
format: "wordnet",
|
237
|
+
synonyms_path: Searchkick.wordnet_path
|
238
|
+
}
|
239
|
+
|
240
|
+
settings[:analysis][:analyzer][:default_index][:filter].insert(4, "searchkick_wordnet")
|
241
|
+
settings[:analysis][:analyzer][:default_index][:filter] << "searchkick_wordnet"
|
242
|
+
end
|
243
|
+
|
233
244
|
if options[:special_characters] == false
|
234
245
|
settings[:analysis][:analyzer].each do |analyzer, analyzer_settings|
|
235
246
|
analyzer_settings[:filter].reject!{|f| f == "asciifolding" }
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Searchkick
|
2
|
+
class ReindexJob
|
3
|
+
|
4
|
+
def initialize(klass, id)
|
5
|
+
@klass = klass
|
6
|
+
@id = id
|
7
|
+
end
|
8
|
+
|
9
|
+
def perform
|
10
|
+
model = @klass.constantize
|
11
|
+
record = model.find(@id) rescue nil # TODO fix lazy coding
|
12
|
+
index = model.searchkick_index
|
13
|
+
if !record or !record.should_index?
|
14
|
+
# hacky
|
15
|
+
record ||= model.new
|
16
|
+
record.id = @id
|
17
|
+
begin
|
18
|
+
index.remove record
|
19
|
+
rescue Elasticsearch::Transport::Transport::Errors::NotFound
|
20
|
+
# do nothing
|
21
|
+
end
|
22
|
+
else
|
23
|
+
index.store record
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
end
|
data/lib/searchkick/version.rb
CHANGED
data/searchkick.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.add_dependency "elasticsearch", ">= 1"
|
23
23
|
spec.add_dependency "hashie"
|
24
24
|
|
25
|
-
spec.add_development_dependency "bundler", "~> 1.
|
25
|
+
spec.add_development_dependency "bundler", "~> 1.6"
|
26
26
|
spec.add_development_dependency "rake"
|
27
|
-
spec.add_development_dependency "minitest"
|
27
|
+
spec.add_development_dependency "minitest"
|
28
28
|
end
|
data/test/autocomplete_test.rb
CHANGED
data/test/boost_test.rb
CHANGED
data/test/facets_test.rb
CHANGED
data/test/highlight_test.rb
CHANGED
data/test/index_test.rb
CHANGED
data/test/inheritance_test.rb
CHANGED
data/test/match_test.rb
CHANGED
data/test/model_test.rb
CHANGED
data/test/query_test.rb
CHANGED
@@ -0,0 +1,33 @@
|
|
1
|
+
require_relative "test_helper"
|
2
|
+
|
3
|
+
class TestReindexJob < Minitest::Test
|
4
|
+
|
5
|
+
def setup
|
6
|
+
super
|
7
|
+
Searchkick.disable_callbacks
|
8
|
+
end
|
9
|
+
|
10
|
+
def teardown
|
11
|
+
Searchkick.enable_callbacks
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_create
|
15
|
+
product = Product.create!(name: "Boom")
|
16
|
+
Product.searchkick_index.refresh
|
17
|
+
assert_search "*", []
|
18
|
+
Searchkick::ReindexJob.new("Product", product.id).perform
|
19
|
+
Product.searchkick_index.refresh
|
20
|
+
assert_search "*", ["Boom"]
|
21
|
+
end
|
22
|
+
|
23
|
+
def test_destroy
|
24
|
+
product = Product.create!(name: "Boom")
|
25
|
+
Product.reindex
|
26
|
+
assert_search "*", ["Boom"]
|
27
|
+
product.destroy
|
28
|
+
Searchkick::ReindexJob.new("Product", product.id).perform
|
29
|
+
Product.searchkick_index.refresh
|
30
|
+
assert_search "*", []
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
data/test/should_index_test.rb
CHANGED
data/test/similar_test.rb
CHANGED
data/test/sql_test.rb
CHANGED
data/test/suggest_test.rb
CHANGED
data/test/synonyms_test.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require_relative "test_helper"
|
2
2
|
|
3
|
-
class TestSynonyms < Minitest::
|
3
|
+
class TestSynonyms < Minitest::Test
|
4
4
|
|
5
5
|
def test_bleach
|
6
6
|
store_names ["Clorox Bleach", "Kroger Bleach"]
|
@@ -42,4 +42,9 @@ class TestSynonyms < Minitest::Unit::TestCase
|
|
42
42
|
assert_search "scallions", ["Green Onions"]
|
43
43
|
end
|
44
44
|
|
45
|
+
# def test_wordnet
|
46
|
+
# store_names ["Creature", "Beast", "Dragon"], Animal
|
47
|
+
# assert_search "animal", ["Creature", "Beast"], {}, Animal
|
48
|
+
# end
|
49
|
+
|
45
50
|
end
|
data/test/test_helper.rb
CHANGED
@@ -6,6 +6,8 @@ require "logger"
|
|
6
6
|
|
7
7
|
ENV["RACK_ENV"] = "test"
|
8
8
|
|
9
|
+
Minitest::Test = Minitest::Unit::TestCase unless defined?(Minitest::Test)
|
10
|
+
|
9
11
|
File.delete("elasticsearch.log") if File.exists?("elasticsearch.log")
|
10
12
|
Searchkick.client.transport.logger = Logger.new("elasticsearch.log")
|
11
13
|
|
@@ -169,7 +171,11 @@ class Store
|
|
169
171
|
end
|
170
172
|
|
171
173
|
class Animal
|
172
|
-
searchkick
|
174
|
+
searchkick \
|
175
|
+
autocomplete: [:name],
|
176
|
+
suggest: [:name],
|
177
|
+
index_name: -> { "#{self.name.tableize}-#{Date.today.year}" }
|
178
|
+
# wordnet: true
|
173
179
|
end
|
174
180
|
|
175
181
|
Product.searchkick_index.delete if Product.searchkick_index.exists?
|
@@ -179,7 +185,7 @@ Product.reindex # run twice for both index paths
|
|
179
185
|
Store.reindex
|
180
186
|
Animal.reindex
|
181
187
|
|
182
|
-
class Minitest::
|
188
|
+
class Minitest::Test
|
183
189
|
|
184
190
|
def setup
|
185
191
|
Product.destroy_all
|
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: 0.8.
|
4
|
+
version: 0.8.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: 2014-08-
|
11
|
+
date: 2014-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '1.
|
61
|
+
version: '1.6'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '1.
|
68
|
+
version: '1.6'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -84,16 +84,16 @@ dependencies:
|
|
84
84
|
name: minitest
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '0'
|
97
97
|
description: Intelligent search made easy
|
98
98
|
email:
|
99
99
|
- andrew@chartkick.com
|
@@ -117,8 +117,8 @@ files:
|
|
117
117
|
- lib/searchkick/model.rb
|
118
118
|
- lib/searchkick/query.rb
|
119
119
|
- lib/searchkick/reindex.rb
|
120
|
+
- lib/searchkick/reindex_job.rb
|
120
121
|
- lib/searchkick/results.rb
|
121
|
-
- lib/searchkick/search.rb
|
122
122
|
- lib/searchkick/similar.rb
|
123
123
|
- lib/searchkick/tasks.rb
|
124
124
|
- lib/searchkick/version.rb
|
@@ -132,6 +132,7 @@ files:
|
|
132
132
|
- test/match_test.rb
|
133
133
|
- test/model_test.rb
|
134
134
|
- test/query_test.rb
|
135
|
+
- test/reindex_job_test.rb
|
135
136
|
- test/should_index_test.rb
|
136
137
|
- test/similar_test.rb
|
137
138
|
- test/sql_test.rb
|
@@ -174,6 +175,7 @@ test_files:
|
|
174
175
|
- test/match_test.rb
|
175
176
|
- test/model_test.rb
|
176
177
|
- test/query_test.rb
|
178
|
+
- test/reindex_job_test.rb
|
177
179
|
- test/should_index_test.rb
|
178
180
|
- test/similar_test.rb
|
179
181
|
- test/sql_test.rb
|
data/lib/searchkick/search.rb
DELETED