elastic_record 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/elastic_record.gemspec +1 -1
- data/lib/elastic_record/tasks/index.rake +8 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d254216fe907d0c00ffb1c00aeb7ef1fcd1c034
|
4
|
+
data.tar.gz: 99b0c21ca7295348e69a666d6a3981cb49b497c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4728a0563f5fddc5a127d164ae816d3e8c7d037d4490b43a3744d8e0bf3174e08ac040340406cc201095728b1e82f02c45431b24191c9e810469fe69a37961b
|
7
|
+
data.tar.gz: 7b007f7549f9159f3d6deedca8c25f2f8e7edf31e70b85f3eeae3fb75bf79513e1769c5019c4e0d17ffcad493d8991947b4ab926a9014c31c839789148e2eac6
|
data/elastic_record.gemspec
CHANGED
@@ -15,7 +15,7 @@ namespace :index do
|
|
15
15
|
task create: :environment do
|
16
16
|
ElasticRecord::Task.get_models.each do |model|
|
17
17
|
index_name = model.elastic_index.create_and_deploy
|
18
|
-
|
18
|
+
puts "Created #{model.name} index (#{index_name})"
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
@@ -23,7 +23,7 @@ namespace :index do
|
|
23
23
|
task drop: :environment do
|
24
24
|
ElasticRecord::Task.get_models.each do |model|
|
25
25
|
model.elastic_index.delete_all
|
26
|
-
|
26
|
+
puts "Dropped #{model.name} index"
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
@@ -33,31 +33,31 @@ namespace :index do
|
|
33
33
|
task update_mapping: :environment do
|
34
34
|
ElasticRecord::Task.get_models.each do |model|
|
35
35
|
model.elastic_index.create_and_deploy
|
36
|
-
|
36
|
+
puts "Updated mapping for #{model.name}"
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
40
|
desc "Add records to index. Deploys a new index by default, or specify INDEX"
|
41
41
|
task build: :environment do
|
42
42
|
ElasticRecord::Task.get_models.each do |model|
|
43
|
-
|
43
|
+
puts "Building #{model.name} index."
|
44
44
|
|
45
45
|
if ENV['INDEX']
|
46
46
|
index_name = ENV['INDEX']
|
47
47
|
else
|
48
|
-
|
48
|
+
puts " Creating index..."
|
49
49
|
index_name = model.elastic_index.create
|
50
50
|
end
|
51
51
|
|
52
|
-
|
52
|
+
puts " Reindexing into #{index_name}"
|
53
53
|
model.find_in_batches(batch_size: 100) do |records|
|
54
54
|
model.elastic_index.bulk_add(records, index_name)
|
55
55
|
end
|
56
56
|
|
57
|
-
|
57
|
+
puts " Deploying index..."
|
58
58
|
model.elastic_index.deploy(index_name)
|
59
59
|
|
60
|
-
|
60
|
+
puts " Done."
|
61
61
|
end
|
62
62
|
end
|
63
63
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elastic_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Infogroup
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-04-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: arelastic
|