es-elasticity 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c7bc6c25943feeda4da146553b189c61bbdad216
4
- data.tar.gz: 9f07d0aa831e187b094481e96178fce66c923139
3
+ metadata.gz: 2c68c0531188ec748580e9dca08ef476d93d2b5f
4
+ data.tar.gz: 05c85b83b78bc01ada5940dfd1bf222de6fdacc0
5
5
  SHA512:
6
- metadata.gz: 5d9109393c9161297e7a103d821f0a91599b8dae175174b228380f82d3db975a9d3d32902cc5ea671da301bc90f8d4705db4ed232ef019d0427c82bf49f032dd
7
- data.tar.gz: bc7fb37f2ded19d2dd98e636a2f346aa078b3bee37c4e49ff3d46278b3d6e1f1d0407e385f04f344887b9bafd6f2b6c8f667fc983f972c5e6ab6725719b4c7be
6
+ metadata.gz: acd0da8c79ee7376bb7d1236ba444e238c1e046af0724d9a6357d51a3d16d4ead3ee357dc19ef646eaaa2d74a70572229732fc211b93eb1de412f8d6989e84b6
7
+ data.tar.gz: d07b79d85935534f65ae761432dab36129094bbe0e9074b3fd9e406a34f74520886f4f1f7239daf7f96e770638b43c373e6780bc090e319046859bdd2db86143
@@ -68,6 +68,12 @@ module Elasticity
68
68
  !self.strategy.missing?
69
69
  end
70
70
 
71
+ # Gets the index name to be used when you need to reference the index somewhere.
72
+ # This depends on the strategy being used, but it always refers to the search index.
73
+ def self.ref_index_name
74
+ self.strategy.ref_index_name
75
+ end
76
+
71
77
  # Remap
72
78
  def self.remap!
73
79
  self.strategy.remap(settings: Elasticity.config.settings, mappings: { document_type => mapping })
@@ -12,6 +12,10 @@ module Elasticity
12
12
  @update_alias = "#{index_base_name}_update"
13
13
  end
14
14
 
15
+ def ref_index_name
16
+ @main_alias
17
+ end
18
+
15
19
  # Remap allows zero-downtime/zero-dataloss remap of elasticsearch indexes. Here is the overview
16
20
  # of how it works:
17
21
  #
@@ -8,6 +8,10 @@ module Elasticity
8
8
  @index_name = index_name
9
9
  end
10
10
 
11
+ def ref_index_name
12
+ @index_name
13
+ end
14
+
11
15
  def remap!
12
16
  raise NotImplementedError
13
17
  end
@@ -1,3 +1,3 @@
1
1
  module Elasticity
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: es-elasticity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Kochenburger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-18 00:00:00.000000000 Z
11
+ date: 2014-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler