algoliasearch-rails 1.23.1 → 1.23.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +7 -0
- data/Gemfile +1 -1
- data/algoliasearch-rails.gemspec +3 -3
- data/lib/algoliasearch-rails.rb +13 -6
- data/lib/algoliasearch/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ac9c6a0bf5ab646bcde8da6a321cab385e1875e258e5a2f2e50120ae7fbd9f0
|
4
|
+
data.tar.gz: 1aef47abb42a2e5cf0fa5201560523c73a44488c763b38b6ad3ad82e55337340
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e4a6e309538e45b67b32b53f041b217cb249fd7dce3a61158b4d256a7d984a1d6b8bdddee38bc5665ff3721c1fdc62042037b385b2a86d0773e84c921abc0ed
|
7
|
+
data.tar.gz: 2dfd9c286a3a12b2a9ca37f0d29669abb5a6454a3368f0c8a0265fed5155c6f3af8f727ec5552ea334b955c78f6dc16918c99ba7db7d54adbe66cd1c84f47db1
|
data/ChangeLog
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## [1.23.2](https://github.com/algolia/algoliasearch-rails/releases/tag/1.23.2) (2019-06-26)
|
4
|
+
|
5
|
+
**Fixed**
|
6
|
+
|
7
|
+
* Use `copy_index` when initiating a temporary index to preserve settings, synonyms, and rules.
|
8
|
+
|
9
|
+
|
3
10
|
## [1.23.0](https://github.com/algolia/algoliasearch-rails/releases/tag/1.23.0) (2019-06-25)
|
4
11
|
|
5
12
|
**Added**
|
data/Gemfile
CHANGED
data/algoliasearch-rails.gemspec
CHANGED
@@ -79,7 +79,7 @@ Gem::Specification.new do |s|
|
|
79
79
|
|
80
80
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
81
81
|
s.add_runtime_dependency(%q<json>, [">= 1.5.1"])
|
82
|
-
s.add_runtime_dependency(%q<algoliasearch>, [">= 1.
|
82
|
+
s.add_runtime_dependency(%q<algoliasearch>, [">= 1.26.0", "< 2.0.0"])
|
83
83
|
s.add_development_dependency(%q<will_paginate>, [">= 2.3.15"])
|
84
84
|
s.add_development_dependency(%q<kaminari>, [">= 0"])
|
85
85
|
s.add_development_dependency "travis"
|
@@ -87,11 +87,11 @@ Gem::Specification.new do |s|
|
|
87
87
|
s.add_development_dependency "rdoc"
|
88
88
|
else
|
89
89
|
s.add_dependency(%q<json>, [">= 1.5.1"])
|
90
|
-
s.add_dependency(%q<algoliasearch>, [">= 1.
|
90
|
+
s.add_dependency(%q<algoliasearch>, [">= 1.26.0", "< 2.0.0"])
|
91
91
|
end
|
92
92
|
else
|
93
93
|
s.add_dependency(%q<json>, [">= 1.5.1"])
|
94
|
-
s.add_dependency(%q<algoliasearch>, [">= 1.
|
94
|
+
s.add_dependency(%q<algoliasearch>, [">= 1.26.0", "< 2.0.0"])
|
95
95
|
end
|
96
96
|
end
|
97
97
|
|
data/lib/algoliasearch-rails.rb
CHANGED
@@ -555,14 +555,21 @@ module AlgoliaSearch
|
|
555
555
|
master_settings.delete 'replicas'
|
556
556
|
|
557
557
|
# init temporary index
|
558
|
-
|
559
|
-
|
558
|
+
src_index_name = algolia_index_name(options)
|
559
|
+
tmp_index_name = "#{src_index_name}.tmp"
|
560
|
+
tmp_options = options.merge({ :index_name => tmp_index_name })
|
560
561
|
tmp_options.delete(:per_environment) # already included in the temporary index_name
|
561
562
|
tmp_settings = settings.dup
|
562
|
-
tmp_index = algolia_ensure_init(tmp_options, tmp_settings, master_settings)
|
563
563
|
|
564
|
-
|
565
|
-
|
564
|
+
if options[:check_settings] == false
|
565
|
+
::Algolia::copy_index!(src_index_name, tmp_index_name, %w(settings synonyms rules))
|
566
|
+
tmp_index = SafeIndex.new(tmp_index_name, !!options[:raise_on_failure])
|
567
|
+
else
|
568
|
+
tmp_index = algolia_ensure_init(tmp_options, tmp_settings, master_settings)
|
569
|
+
end
|
570
|
+
|
571
|
+
algolia_find_in_batches(batch_size) do |group|
|
572
|
+
if algolia_conditional_index?(options)
|
566
573
|
# select only indexable objects
|
567
574
|
group = group.select { |o| algolia_indexable?(o, tmp_options) }
|
568
575
|
end
|
@@ -570,7 +577,7 @@ module AlgoliaSearch
|
|
570
577
|
tmp_index.save_objects(objects)
|
571
578
|
end
|
572
579
|
|
573
|
-
move_task = SafeIndex.move_index(tmp_index.name,
|
580
|
+
move_task = SafeIndex.move_index(tmp_index.name, src_index_name)
|
574
581
|
master_index.wait_task(move_task["taskID"]) if synchronous || options[:synchronous]
|
575
582
|
end
|
576
583
|
nil
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: algoliasearch-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.23.
|
4
|
+
version: 1.23.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Algolia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06-
|
11
|
+
date: 2019-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: 1.26.0
|
34
34
|
- - "<"
|
35
35
|
- !ruby/object:Gem::Version
|
36
36
|
version: 2.0.0
|
@@ -40,7 +40,7 @@ dependencies:
|
|
40
40
|
requirements:
|
41
41
|
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: 1.
|
43
|
+
version: 1.26.0
|
44
44
|
- - "<"
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: 2.0.0
|