mongoid-elasticsearch 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mongoid/elasticsearch/indexing.rb +5 -1
- data/lib/mongoid/elasticsearch/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 553691b47f099f7ce35b48bab9f8f15f7e969624
|
4
|
+
data.tar.gz: bfba44469d169221d85748cd32a0c4537472fb4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e693de712fb4029acfa93b3a9dd94a320f8759d15dc650d2cf681cfdb6014001aa6b789e4e9481467b00300e50485e8afba1419c368ea34dc3bce0ec52f55d89
|
7
|
+
data.tar.gz: 5ec5511e85bdb60ddec9d570a7d8b5dc096ad94921d45005ce87c505de554903be0e31f92f93c1defdb82c07ab84b3acd2d144b52bd9f075edcd78d1a8769ed9
|
@@ -6,9 +6,13 @@ module Mongoid
|
|
6
6
|
def as_indexed_json
|
7
7
|
serializable_hash.reject { |k, v| %w(_id c_at u_at created_at updated_at).include?(k) }
|
8
8
|
end
|
9
|
+
|
10
|
+
def es_index?
|
11
|
+
true
|
12
|
+
end
|
9
13
|
|
10
14
|
def es_update
|
11
|
-
if destroyed?
|
15
|
+
if destroyed? || !es_index?
|
12
16
|
self.class.es.remove_item(self)
|
13
17
|
else
|
14
18
|
self.class.es.index_item(self)
|