es_fields 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2a294349602638bcbc9aef084dc3ff070e1b869de28881956db5b009ae9deb15
4
- data.tar.gz: 59c49eb93c6e4237bdaf890f688100196cf7e1e0352336d2759e052bd9ace796
3
+ metadata.gz: 3d869fd22f7fc259d78bea3742ef9db1451ac20cb8d7d8424b80f78b8a9172ec
4
+ data.tar.gz: 514c789b69c8adaa99fabf46b4f0647db9a32a0ff030f6bcae7eb4ff7b027b53
5
5
  SHA512:
6
- metadata.gz: 85043699bb5f5f4505399ed4bbfccfedd5af498bbcd0368f14ab1755b09bb300b20c62b22fd1dc90ee1d877db69ad658e9dec276a3ccdcd692bfb30b9cf54936
7
- data.tar.gz: 4d2fe72c1e743d5ebe1701f086f0171189cf9685c1886098bcf3b32fa22835f70765f5dbd9ec9e445e3e5791667ac302ec7889290de750dd661ad73e583db030
6
+ metadata.gz: 2934a424924afddc6c2a02e3fec7f250caaec5228be83461396ca3a6b12d3b92d782dcd3130e7622f48042a673fffb2427030203a4d454c23c63db212a3d6d10
7
+ data.tar.gz: eb0556ae2d22a58abe3ab4c72994596edf7060f68e01b0758787aefbe381c338e003ac75f3f676cbdab300ddc6bc9fe0512208734033483d83959f38337a3818
data/README.md CHANGED
@@ -1,8 +1,5 @@
1
1
  # EsFields
2
-
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/es_fields`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
2
+ Provides an idiomatic way to generate elastic search fields mappings.
6
3
 
7
4
  ## Installation
8
5
 
@@ -22,7 +19,14 @@ Or install it yourself as:
22
19
 
23
20
  ## Usage
24
21
 
25
- TODO: Write usage instructions here
22
+ ```ruby
23
+ mapping do
24
+ field :name, :string
25
+ field :age, :long
26
+ end
27
+ ```
28
+ This will generate ElasticSearch field mappings and return a
29
+ Hash which can be used with ElasticSearch API to add fields to an existing index.
26
30
 
27
31
  ## Development
28
32
 
@@ -32,7 +36,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
32
36
 
33
37
  ## Contributing
34
38
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/es_fields.
39
+ Bug reports and pull requests are welcome on GitHub at https://github.com/yask123/es_fields.
36
40
 
37
41
  ## License
38
42
 
@@ -1,3 +1,3 @@
1
1
  module EsFields
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/lib/es_fields.rb CHANGED
@@ -20,7 +20,12 @@ class Fields
20
20
 
21
21
  TYPE_MAPPING = {
22
22
  string: 'text',
23
- long: 'long'
23
+ long: 'long',
24
+ date: 'date',
25
+ keyword: 'keyword',
26
+ double: 'double',
27
+ boolean: 'boolean',
28
+ ip: 'ip',
24
29
  }
25
30
 
26
31
  def initialize
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: es_fields
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yask Srivastava
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-06-17 00:00:00.000000000 Z
11
+ date: 2018-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler