elasticsearch-indexstager 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/elasticsearch/index_stager.rb +2 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f954192233eea6e297161b49618399bdae9978bc
|
4
|
+
data.tar.gz: 3dea1ca8fc2a5dff4998c48f04fb6eb2463aba75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d25461f034f8ee24c139b791267fc04a6899cbd80c9a7743bb60799082a581747041e575d7d910b3ea5ec33a2f8ee09a3709c504db413c752fa8085916b804ad
|
7
|
+
data.tar.gz: d3d235eff05326dbee6f0beb615716cfb77a0d857d211be1a5e429bb95bf1d28b49c6bba16c124dd19e92a66f8e8866a9789bbaabb1d22de4f4faa2ef7fb90b9
|
@@ -2,7 +2,7 @@ require 'securerandom'
|
|
2
2
|
|
3
3
|
module Elasticsearch
|
4
4
|
class IndexStager
|
5
|
-
VERSION = '1.1.
|
5
|
+
VERSION = '1.1.3'
|
6
6
|
|
7
7
|
attr_reader :index_name, :es_client
|
8
8
|
|
@@ -80,6 +80,7 @@ module Elasticsearch
|
|
80
80
|
def rename_live_index
|
81
81
|
# if the live index exists but is empty, it fill fail to reindex (rename)
|
82
82
|
# so catch that case and just delete it.
|
83
|
+
es_client.indices.refresh index: @live_index_name rescue false
|
83
84
|
idx_stats = es_client.indices.stats index: @live_index_name, docs: true
|
84
85
|
num_docs = idx_stats['indices'][@live_index_name]['total']['docs']['count']
|
85
86
|
if num_docs.to_i == 0
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elasticsearch-indexstager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Karman
|
@@ -70,16 +70,16 @@ dependencies:
|
|
70
70
|
name: elasticsearch-extensions
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '0'
|
83
83
|
description: manage Elasticsearch indexes using staging pattern
|
84
84
|
email:
|
85
85
|
- karpet@peknet.com
|