es-elasticity 0.2.5 → 0.2.6

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: 930171d9343f5f51201e859afbc8f227e108a855
4
- data.tar.gz: 7a949337b0c6265451e00bf5bc8ac9eef3170321
3
+ metadata.gz: a45df14b8d96ab9f324461a6c62c226c3166b03c
4
+ data.tar.gz: 78f6f7b959299ddd2836676e236f5e59e653d37d
5
5
  SHA512:
6
- metadata.gz: 4f9cc21bea9324244cc52ffee24d4f4b6feddfaf59cc01962ce13162f99ff1af50a740a85408426328c98dd2566caab4524d7525a585d9efe04f2e82ce9abd1d
7
- data.tar.gz: 16752b85bdcd775b75b59e0e9b11a2a1b53bbaad7e44e40485e700888214df93d9978e1a0330055ebf7dc86ce6783010aef7905a9686e155529039b49017afb1
6
+ metadata.gz: 86bd2492bb54b2286b380635e9b09fd2a4f1b701ad57648b34b703c1c708d156ae6e1765867d213b539f47d1072003be2a92c00a600a0c083b0be08b30d81ff4
7
+ data.tar.gz: c2197c269b55a016880aedd536c85945d0ba9978f32adb19d434da68a3bc22bc7d6dda8fe55f6def39f4ad6fee5cb7671c81b645e4489572a5fb17247f638f0a
@@ -18,6 +18,11 @@ module Elasticity
18
18
  self.index.recreate(settings: Elasticity.config.settings, mappings: { document_type => @mappings })
19
19
  end
20
20
 
21
+ # Deletes the index
22
+ def self.delete_index
23
+ self.index.delete
24
+ end
25
+
21
26
  # The index name to be used for indexing and storing data for this document model.
22
27
  # By default, it's the class name converted to underscore and plural.
23
28
  def self.index_name
@@ -81,6 +81,10 @@ module Elasticity
81
81
  empty?
82
82
  end
83
83
 
84
+ def suggestions
85
+ @response["suggest"] || {}
86
+ end
87
+
84
88
  def mapping
85
89
  return @mapping if defined?(@mapping)
86
90
  hits = Array(@response["hits"]["hits"])
@@ -1,3 +1,3 @@
1
1
  module Elasticity
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: es-elasticity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Kochenburger