es-elasticity 0.13.5 → 0.14.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
  SHA256:
3
- metadata.gz: 5c4316c6610d7f5addf5d417e544134b753555bc6108477a883d75adff3fdc0b
4
- data.tar.gz: b7ee0ed0e2aa9c1788b97019d33663ecdcfe30a7e093c6bff535d72380ce60b8
3
+ metadata.gz: 77be59b21060843a1cfd378874a25d43c99b7cda2c264c4aa998ff8bcd70a112
4
+ data.tar.gz: 5dbaf77099a4ce92ca3b241bd07259b34a5e958afa8389f41ed988a995fd5fb5
5
5
  SHA512:
6
- metadata.gz: 8caeb93cf0826a4425a2d3dc7d315f22773e97a533846a9fb620cea3f6aba152c737f647ef933db92348930d9a7ee47899d28aa161b7555f2f5e39b68d2e40fd
7
- data.tar.gz: 69aab0b5620f1767f4c6c08a2624dafdf18f8337afe95203ece5869932adfd484c8c9dfa3c249daf3af8e4296bb3a3f69f7f7de19d7b9c5650d9cfec583df7ad
6
+ metadata.gz: 8a0194b307ca27ac3b1359edc2181c0541edd7ed36ce3de02d8be8d0be4b93bdce4ab00780bf6fd4305a852542348cbc9047493f68a3afb98456d9f4995a3046
7
+ data.tar.gz: b26720d7fa9987c315caa4f7bb08e2eb3d23fb893d8e0b388647a3555d0cfb654348d204249e8afacb2812799877c9225da413bbc1d114294e09b6a8c46a35c4
data/.circleci/config.yml CHANGED
@@ -4,47 +4,47 @@ orbs:
4
4
  gem: doximity/gem-publisher@0
5
5
 
6
6
  executors:
7
-
8
7
  # used for building the gem
9
8
  ruby-latest:
10
9
  resource_class: small
11
10
  docker:
12
- - image: circleci/ruby:latest
11
+ - image: cimg/ruby:3.1
13
12
  environment:
14
- BUNDLE_VERSION: "~> 1.17"
13
+ BUNDLE_VERSION: '~> 2.3.4'
15
14
 
16
15
  # used for testing the gem:
17
- ruby_2_5:
16
+ ruby_2_7:
18
17
  resource_class: small
19
18
  docker:
20
- - image: circleci/ruby:2.5
19
+ - image: cimg/ruby:2.7
21
20
  environment:
22
- BUNDLE_VERSION: "~> 1.17"
23
- - image: elastic/elasticsearch:6.8.2
21
+ BUNDLE_VERSION: '~> 2.3.4'
22
+ - image: docker.elastic.co/elasticsearch/elasticsearch:7.17.3
24
23
  environment:
25
- - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
24
+ - 'ES_JAVA_OPTS=-Xms512m -Xmx512m'
26
25
  - discovery.type=single-node
27
26
  - xpack.security.enabled=false
28
- ruby_2_6:
27
+ ruby_3_0:
29
28
  resource_class: small
30
29
  docker:
31
- - image: circleci/ruby:2.6
30
+ - image: cimg/ruby:3.0
32
31
  environment:
33
- BUNDLE_VERSION: "~> 1.17"
34
- - image: elastic/elasticsearch:6.8.2
32
+ BUNDLE_VERSION: '~> 2.3.4'
33
+ - image: docker.elastic.co/elasticsearch/elasticsearch:7.17.3
35
34
  environment:
36
- - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
35
+ - 'ES_JAVA_OPTS=-Xms512m -Xmx512m'
37
36
  - discovery.type=single-node
38
37
  - xpack.security.enabled=false
39
- ruby_2_7:
38
+
39
+ ruby_3_1:
40
40
  resource_class: small
41
41
  docker:
42
- - image: circleci/ruby:2.7
42
+ - image: cimg/ruby:3.1
43
43
  environment:
44
- BUNDLE_VERSION: "~> 1.17"
45
- - image: elastic/elasticsearch:6.8.2
44
+ BUNDLE_VERSION: '~> 2.3.4'
45
+ - image: docker.elastic.co/elasticsearch/elasticsearch:7.17.3
46
46
  environment:
47
- - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
47
+ - 'ES_JAVA_OPTS=-Xms512m -Xmx512m'
48
48
  - discovery.type=single-node
49
49
  - xpack.security.enabled=false
50
50
 
@@ -69,8 +69,8 @@ version_tags_only: &version_tags_only
69
69
  only: /^v.*/
70
70
 
71
71
  jobs:
72
- build_2_5:
73
- executor: ruby_2_5
72
+ build_2_7:
73
+ executor: ruby_2_7
74
74
  steps:
75
75
  - checkout
76
76
  - run:
@@ -79,12 +79,12 @@ jobs:
79
79
  gem install bundler --version "${BUNDLE_VERSION}" --force
80
80
  - restore_cache:
81
81
  keys:
82
- - v1-bundle-ruby_2_5-{{ checksum "Gemfile.lock" }}
82
+ - v3-bundle-ruby_2_7-{{ checksum "Gemfile.lock" }}
83
83
  - run:
84
84
  name: Install Ruby Dependencies
85
85
  command: bundle check --path=vendor/bundle || bundle install --local --frozen --path=vendor/bundle --jobs=4 --retry=3
86
86
  - save_cache:
87
- key: v1-bundle-ruby_2_5-{{ checksum "Gemfile.lock" }}
87
+ key: v3-bundle-ruby_2_7-{{ checksum "Gemfile.lock" }}
88
88
  paths:
89
89
  - vendor/bundle
90
90
  - run:
@@ -97,8 +97,8 @@ jobs:
97
97
  root: .
98
98
  paths:
99
99
  - vendor/bundle
100
- build_2_6:
101
- executor: ruby_2_6
100
+ build_3_0:
101
+ executor: ruby_3_0
102
102
  steps:
103
103
  - checkout
104
104
  - run:
@@ -107,12 +107,12 @@ jobs:
107
107
  gem install bundler --version "${BUNDLE_VERSION}" --force
108
108
  - restore_cache:
109
109
  keys:
110
- - v1-bundle-ruby_2_6-{{ checksum "Gemfile.lock" }}
110
+ - v3-bundle-ruby_3_0-{{ checksum "Gemfile.lock" }}
111
111
  - run:
112
112
  name: Install Ruby Dependencies
113
113
  command: bundle check --path=vendor/bundle || bundle install --local --frozen --path=vendor/bundle --jobs=4 --retry=3
114
114
  - save_cache:
115
- key: v1-bundle-ruby_2_6-{{ checksum "Gemfile.lock" }}
115
+ key: v3-bundle-ruby_3_0-{{ checksum "Gemfile.lock" }}
116
116
  paths:
117
117
  - vendor/bundle
118
118
  - run:
@@ -125,8 +125,9 @@ jobs:
125
125
  root: .
126
126
  paths:
127
127
  - vendor/bundle
128
- build_2_7:
129
- executor: ruby_2_7
128
+
129
+ build_3_1:
130
+ executor: ruby_3_1
130
131
  steps:
131
132
  - checkout
132
133
  - run:
@@ -135,12 +136,12 @@ jobs:
135
136
  gem install bundler --version "${BUNDLE_VERSION}" --force
136
137
  - restore_cache:
137
138
  keys:
138
- - v1-bundle-ruby_2_7-{{ checksum "Gemfile.lock" }}
139
+ - v3-bundle-ruby_3_1-{{ checksum "Gemfile.lock" }}
139
140
  - run:
140
141
  name: Install Ruby Dependencies
141
142
  command: bundle check --path=vendor/bundle || bundle install --local --frozen --path=vendor/bundle --jobs=4 --retry=3
142
143
  - save_cache:
143
- key: v1-bundle-ruby_2_7-{{ checksum "Gemfile.lock" }}
144
+ key: v3-bundle-ruby_3_1-{{ checksum "Gemfile.lock" }}
144
145
  paths:
145
146
  - vendor/bundle
146
147
  - run:
@@ -158,33 +159,33 @@ workflows:
158
159
  version: 2
159
160
  trunk:
160
161
  jobs:
161
- - build_2_5:
162
+ - build_2_7:
162
163
  <<: *master_only
163
- - build_2_6:
164
+ - build_3_0:
164
165
  <<: *master_only
165
- - build_2_7:
166
+ - build_3_1:
166
167
  <<: *master_only
167
168
  - gem/build:
168
169
  <<: *master_only
169
170
  executor: ruby-latest
170
171
  name: gem-build
171
172
  requires:
172
- - build_2_5
173
+ - build_3_1
173
174
 
174
175
  pull-requests:
175
176
  jobs:
176
- - build_2_5:
177
+ - build_2_7:
177
178
  <<: *pr_only
178
- - build_2_6:
179
+ - build_3_0:
179
180
  <<: *pr_only
180
- - build_2_7:
181
+ - build_3_1:
181
182
  <<: *pr_only
182
183
  - gem/build:
183
184
  <<: *pr_only
184
185
  executor: ruby-latest
185
186
  name: gem-build
186
187
  requires:
187
- - build_2_5
188
+ - build_3_1
188
189
  - pre-release-approval:
189
190
  <<: *pr_only
190
191
  type: approval
@@ -193,7 +194,8 @@ workflows:
193
194
  - gem/publish:
194
195
  <<: *pr_only
195
196
  name: gem-publish
196
- to_rubygems: true
197
+ to_rubygems: false
198
+ to_nexus: true
197
199
  pre_release: true
198
200
  requires:
199
201
  - pre-release-approval
@@ -201,18 +203,18 @@ workflows:
201
203
 
202
204
  final-release:
203
205
  jobs:
204
- - build_2_5:
206
+ - build_2_7:
205
207
  <<: *version_tags_only
206
- - build_2_6:
208
+ - build_3_0:
207
209
  <<: *version_tags_only
208
- - build_2_7:
210
+ - build_3_1:
209
211
  <<: *version_tags_only
210
212
  - gem/build:
211
213
  <<: *version_tags_only
212
214
  executor: ruby-latest
213
215
  name: gem-build
214
216
  requires:
215
- - build_2_5
217
+ - build_3_1
216
218
  - gem/publish:
217
219
  <<: *version_tags_only
218
220
  name: gem-publish
data/CHANGELOG.md CHANGED
@@ -6,6 +6,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.14.1] - 2022-08-09
10
+ ### Changed
11
+ - Don't publish pre-release builds to RubyGems
12
+
13
+ ## [0.14.0] - 2022-08-04
14
+ ### Changed
15
+ - Use `refresh` instead of `flush` where search is expected to be updated
16
+ - Drop support for Ruby 2.5 and 2.6
17
+ - Add support for Ruby 2.7 and 3.0, build against Ruby 3.1
18
+ - Set `search_type` to `query_then_fetch` as we no longer support Elasticsearch version < 7.0
19
+ - Set `include_type_name` when fetching the mapping. Will be removed in the next version to support ES version 8.
20
+ - Index names automatically use the new timestamp format when creating an index.
9
21
 
10
22
  ## [0.13.5] - 2020-05-21
11
23
  ### Changed
data/CONTRIBUTING.md CHANGED
@@ -1,31 +1,30 @@
1
- # Contributing
1
+ # Contributing to Doximity
2
2
 
3
3
  We welcome contributions to this repository. Feel free to submit issues for bugs you encounter and pull requests for code and documentation contributions.
4
+ In order to prevent licensing issues, Doximity Inc. (“Doximity”, “we”, “us”) requires all contributors to agree to an Individual Contributor License Agreement (“CLA”), which is reproduced below. By submitting your contributions to us, you agree that you have read and are bound by the CLA. If you do not agree with the CLA, you may not submit contributions.
4
5
 
5
- In order to prevent licensing issues, we require all contributors to sign an individual contributor license agreement, which is reproduced below:
6
+ ## Doximity Individual Contributor License Agreement
6
7
 
7
- ## Individual Contributor License Agreement
8
+ This license is for your protection as a Contributor as well as the protection of Doximity; it does not change your rights to use your own Contributions for any other purpose.
8
9
 
9
- In order to clarify the intellectual property license granted with Contributions from any person or entity, Doximity, Inc. ("Doximity") must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of Doximity; it does not change your rights to use your own Contributions for any other purpose.
10
-
11
- You accept and agree to the following terms and conditions for Your present and future Contributions submitted to Doximity. Except for the license granted herein to Doximity and recipients of software distributed by Doximity, You reserve all right, title, and interest in and to Your Contributions.
10
+ You accept and agree to the following terms and conditions for Your present and future Contributions submitted to Doximity. Except for the license granted herein to Doximity and recipients of software distributed by Doximity, You reserve all right, titles, and interests in and to Your Contributions.
12
11
 
13
12
  ### Definitions
14
13
 
15
- "You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with Doximity. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
14
+ "You" (or "Your" or the “Contributor”) shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with Doximity. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
16
15
 
17
- 1. "Contribution" shall mean any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to Doximity for inclusion in, or documentation of, any of the products owned or managed by Doximity (the "Work"). For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to Doximity or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, Doximity for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as "Not a Contribution."
16
+ 1. "Contribution" shall mean the code, documentation, or any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to Doximity for inclusion in, or documentation of, any of the products owned or managed by Doximity (the "Work"). For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to Doximity or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, Doximity for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as "Not a Contribution."
18
17
 
19
18
  2. Grant of Copyright License. Subject to the terms and conditions of this Agreement, You hereby grant to Doximity and to recipients of software distributed by Doximity a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works.
20
19
 
21
- 3. Grant of Patent License. Subject to the terms and conditions of this Agreement, You hereby grant to Doximity and to recipients of software distributed by Doximity a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contribution(s) alone or by combination of Your Contribution(s) with the Work to which such Contribution(s) was submitted. If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that your Contribution, or the Work to which you have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Work shall terminate as of the date such litigation is filed.
20
+ 3. Grant of Patent License. Subject to the terms and conditions of this Agreement, You hereby grant to Doximity and to recipients of software distributed by Doximity a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contribution(s) alone or by a combination of Your Contribution(s) with the Work to which such Contribution(s) was submitted. If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that your Contribution, or the Work to which you have contributed, constitutes a direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Work shall terminate as of the date such litigation is filed.
22
21
 
23
- 4. You represent that you are legally entitled to grant the above license. If your employer(s) has rights to intellectual property that you create that includes your Contributions, you represent that you have received permission to make Contributions on behalf of that employer, that your employer has waived such rights for your Contributions to Doximity, or that your employer has executed a separate Corporate CLA with Doximity.
22
+ 4. You represent that You are legally entitled to grant the above license. If your employer(s) has rights to intellectual property that you create that includes your Contributions, you represent that you have received permission to make Contributions on behalf of that employer, that your employer has waived such rights for your Contributions to Doximity, or that your employer has executed a separate Corporate CLA with Doximity.
24
23
 
25
24
  5. You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of others). You represent that Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which you are personally aware and which are associated with any part of Your Contributions.
26
25
 
27
- 6. You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON- INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.
26
+ 6. You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.
28
27
 
29
- 7. Should You wish to submit work that is not Your original creation, You may submit it to Doximity separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which you are personally aware, and conspicuously marking the work as "Submitted on behalf of a third-party: [[]named here]".
28
+ 7. Should You wish to submit work that is not Your original creation, You may submit it to Doximity separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which you are personally aware, and conspicuously marking the work as "Submitted on behalf of a third-party: [named here]".
30
29
 
31
30
  8. You agree to notify Doximity of any facts or circumstances of which you become aware that would make these representations inaccurate in any respect.
data/Gemfile.lock CHANGED
@@ -1,48 +1,68 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- es-elasticity (0.13.5)
5
- activemodel (>= 4.0.0, < 7)
6
- activerecord (>= 4.0.0, < 7)
7
- activesupport (>= 4.0.0, < 7)
8
- elasticsearch (>= 1.0)
4
+ es-elasticity (0.14.1)
5
+ activemodel (>= 5.2.0, < 7.1)
6
+ activerecord (>= 5.2.0, < 7.1)
7
+ activesupport (>= 5.2.0, < 7.1)
8
+ elasticsearch (>= 7, < 8)
9
9
 
10
10
  GEM
11
11
  remote: https://artifacts.dox.support/repository/gems/
12
12
  specs:
13
- activemodel (6.0.3.1)
14
- activesupport (= 6.0.3.1)
15
- activerecord (6.0.3.1)
16
- activemodel (= 6.0.3.1)
17
- activesupport (= 6.0.3.1)
18
- activesupport (6.0.3.1)
13
+ activemodel (7.0.3.1)
14
+ activesupport (= 7.0.3.1)
15
+ activerecord (7.0.3.1)
16
+ activemodel (= 7.0.3.1)
17
+ activesupport (= 7.0.3.1)
18
+ activesupport (7.0.3.1)
19
19
  concurrent-ruby (~> 1.0, >= 1.0.2)
20
- i18n (>= 0.7, < 2)
21
- minitest (~> 5.1)
22
- tzinfo (~> 1.1)
23
- zeitwerk (~> 2.2, >= 2.2.2)
20
+ i18n (>= 1.6, < 2)
21
+ minitest (>= 5.1)
22
+ tzinfo (~> 2.0)
24
23
  byebug (11.0.1)
25
24
  codeclimate-test-reporter (1.0.9)
26
25
  simplecov (<= 0.13)
27
26
  coderay (1.1.2)
28
- concurrent-ruby (1.1.6)
27
+ concurrent-ruby (1.1.10)
29
28
  diff-lcs (1.3)
30
- elasticsearch (7.7.0)
31
- elasticsearch-api (= 7.7.0)
32
- elasticsearch-transport (= 7.7.0)
33
- elasticsearch-api (7.7.0)
29
+ elasticsearch (7.17.1)
30
+ elasticsearch-api (= 7.17.1)
31
+ elasticsearch-transport (= 7.17.1)
32
+ elasticsearch-api (7.17.1)
34
33
  multi_json
35
- elasticsearch-transport (7.7.0)
34
+ elasticsearch-transport (7.17.1)
36
35
  faraday (~> 1)
37
36
  multi_json
38
- faraday (1.0.1)
39
- multipart-post (>= 1.2, < 3)
40
- i18n (1.8.2)
37
+ faraday (1.10.1)
38
+ faraday-em_http (~> 1.0)
39
+ faraday-em_synchrony (~> 1.0)
40
+ faraday-excon (~> 1.1)
41
+ faraday-httpclient (~> 1.0)
42
+ faraday-multipart (~> 1.0)
43
+ faraday-net_http (~> 1.0)
44
+ faraday-net_http_persistent (~> 1.0)
45
+ faraday-patron (~> 1.0)
46
+ faraday-rack (~> 1.0)
47
+ faraday-retry (~> 1.0)
48
+ ruby2_keywords (>= 0.0.4)
49
+ faraday-em_http (1.0.0)
50
+ faraday-em_synchrony (1.0.0)
51
+ faraday-excon (1.1.0)
52
+ faraday-httpclient (1.0.1)
53
+ faraday-multipart (1.0.4)
54
+ multipart-post (~> 2)
55
+ faraday-net_http (1.0.1)
56
+ faraday-net_http_persistent (1.2.0)
57
+ faraday-patron (1.0.0)
58
+ faraday-rack (1.0.0)
59
+ faraday-retry (1.0.3)
60
+ i18n (1.12.0)
41
61
  concurrent-ruby (~> 1.0)
42
62
  method_source (0.9.2)
43
- minitest (5.14.1)
44
- multi_json (1.14.1)
45
- multipart-post (2.1.1)
63
+ minitest (5.16.2)
64
+ multi_json (1.15.0)
65
+ multipart-post (2.2.3)
46
66
  oj (3.10.0)
47
67
  pry (0.12.2)
48
68
  coderay (~> 1.1.0)
@@ -63,21 +83,20 @@ GEM
63
83
  rspec-support (3.1.2)
64
84
  rspec_junit_formatter (0.4.1)
65
85
  rspec-core (>= 2, < 4, != 2.12.0)
86
+ ruby2_keywords (0.0.5)
66
87
  simplecov (0.7.1)
67
88
  multi_json (~> 1.0)
68
89
  simplecov-html (~> 0.7.1)
69
90
  simplecov-html (0.7.1)
70
- thread_safe (0.3.6)
71
- timecop (0.9.1)
72
- tzinfo (1.2.7)
73
- thread_safe (~> 0.1)
74
- zeitwerk (2.3.0)
91
+ timecop (0.9.5)
92
+ tzinfo (2.0.5)
93
+ concurrent-ruby (~> 1.0)
75
94
 
76
95
  PLATFORMS
77
96
  ruby
78
97
 
79
98
  DEPENDENCIES
80
- bundler (~> 1.7)
99
+ bundler (~> 2.3.4)
81
100
  byebug
82
101
  codeclimate-test-reporter
83
102
  es-elasticity!
@@ -91,4 +110,4 @@ DEPENDENCIES
91
110
  timecop
92
111
 
93
112
  BUNDLED WITH
94
- 1.17.3
113
+ 2.3.4
data/README.md CHANGED
@@ -436,12 +436,12 @@ The default persistence strategy changed from SingleIndex to AliasIndex in versi
436
436
 
437
437
  ## Contributing
438
438
 
439
- 1. Fork it ( https://github.com/[my-github-username]/elasticity/fork )
440
- 2. Create your feature branch (`git checkout -b my-new-feature`)
441
- 3. Commit your changes (`git commit -am 'Add some feature'`)
442
- 4. Push to the branch (`git push origin my-new-feature`)
443
- 5. Create a new Pull Request
444
- 6. Sign the CLA if you haven't yet. See CONTRIBUTING.md
439
+ 1. See [CONTRIBUTING.md](./CONTRIBUTING.md)
440
+ 2. Fork it ( https://github.com/[my-github-username]/elasticity/fork )
441
+ 3. Create your feature branch (`git checkout -b my-new-feature`)
442
+ 4. Commit your changes (`git commit -am 'Add some feature'`)
443
+ 5. Push to the branch (`git push origin my-new-feature`)
444
+ 6. Create a new Pull Request
445
445
 
446
446
  ## Gem documentation
447
447
 
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
22
22
  spec.require_paths = ["lib"]
23
23
 
24
- spec.add_development_dependency "bundler", "~> 1.7"
24
+ spec.add_development_dependency "bundler", "~> 2.3.4"
25
25
  spec.add_development_dependency "byebug"
26
26
  spec.add_development_dependency "codeclimate-test-reporter"
27
27
  spec.add_development_dependency "oj"
@@ -33,8 +33,8 @@ Gem::Specification.new do |spec|
33
33
  spec.add_development_dependency "simplecov", "~> 0.7.1"
34
34
  spec.add_development_dependency "timecop"
35
35
 
36
- spec.add_dependency "activemodel", ">= 4.0.0", "< 7"
37
- spec.add_dependency "activerecord", ">= 4.0.0", "< 7"
38
- spec.add_dependency "activesupport", ">= 4.0.0", "< 7"
39
- spec.add_dependency "elasticsearch", ">= 1.0"
36
+ spec.add_dependency "activemodel", ">= 5.2.0", "< 7.1"
37
+ spec.add_dependency "activerecord", ">= 5.2.0", "< 7.1"
38
+ spec.add_dependency "activesupport", ">= 5.2.0", "< 7.1"
39
+ spec.add_dependency "elasticsearch", ">= 7", "< 8"
40
40
  end
@@ -186,7 +186,7 @@ module Elasticity
186
186
  def search
187
187
  return @search if defined?(@search)
188
188
  args = @search_definition.to_search_args
189
- args = args.merge(search_type: ScrollableSearch.search_type, size: @size, scroll: @scroll)
189
+ args = args.merge(search_type: :query_then_fetch, size: @size, scroll: @scroll)
190
190
  @search = @client.search(args)
191
191
  end
192
192
  end
@@ -11,14 +11,16 @@ module Elasticity
11
11
 
12
12
  STATUSES = [:missing, :ok]
13
13
 
14
- def initialize(client, index_base_name, document_type, use_new_timestamp_format = false, include_type_name_on_create = true)
14
+ def initialize(client, index_base_name, document_type, use_new_timestamp_format = true, include_type_name_on_create = true)
15
15
  @client = client
16
16
  @main_alias = index_base_name
17
17
  @update_alias = "#{index_base_name}_update"
18
18
  @document_type = document_type
19
19
 
20
- # included for compatibility with v7
20
+ # Deprecated: The use_new_timestamp_format option is no longer used and will be removed in the next version.
21
21
  @use_new_timestamp_format = use_new_timestamp_format
22
+
23
+ # included for compatibility with v7
22
24
  @include_type_name_on_create = include_type_name_on_create
23
25
  end
24
26
 
@@ -60,8 +62,8 @@ module Elasticity
60
62
  ]
61
63
  })
62
64
 
63
- @client.index_flush(index: original_index)
64
- cursor = @client.search index: original_index, search_type: ScrollableSearch.search_type, scroll: '10m', size: 100
65
+ @client.index_refresh(index: original_index)
66
+ cursor = @client.search index: original_index, search_type: :query_then_fetch, scroll: '10m', size: 100
65
67
  loop do
66
68
  hits = cursor['hits']['hits']
67
69
  break if hits.empty?
@@ -130,8 +132,8 @@ module Elasticity
130
132
  ]
131
133
  })
132
134
 
133
- @client.index_flush(index: new_index)
134
- cursor = @client.search index: new_index, search_type: ScrollableSearch.search_type, scroll: '1m', size: 100
135
+ @client.index_refresh(index: new_index)
136
+ cursor = @client.search index: new_index, search_type: :query_then_fetch, scroll: '1m', size: 100
135
137
  loop do
136
138
  hits = cursor['hits']['hits']
137
139
  break if hits.empty?
@@ -146,7 +148,7 @@ module Elasticity
146
148
  cursor = @client.scroll(scroll_id: cursor['_scroll_id'], scroll: '1m')
147
149
  end
148
150
 
149
- @client.index_flush(index: original_index)
151
+ @client.index_refresh(index: original_index)
150
152
  @client.index_update_aliases(body: {
151
153
  actions: [
152
154
  { remove: { index: new_index, alias: @main_alias } },
@@ -281,7 +283,7 @@ module Elasticity
281
283
  end
282
284
 
283
285
  def mapping
284
- @client.index_get_mapping(index: @main_alias, type: @document_type).values.first
286
+ @client.index_get_mapping(index: @main_alias, type: @document_type, include_type_name: @include_type_name_on_create).values.first
285
287
  rescue Elasticsearch::Transport::Transport::Errors::NotFound
286
288
  nil
287
289
  end
@@ -289,12 +291,7 @@ module Elasticity
289
291
  private
290
292
 
291
293
  def build_index_name
292
- ts = String.new
293
- if @use_new_timestamp_format == true
294
- ts = Time.now.utc.strftime("%Y%m%d%H%M%S%6N")
295
- else
296
- ts = Time.now.utc.strftime("%Y-%m-%d_%H:%M:%S.%6N")
297
- end
294
+ ts = Time.now.utc.strftime("%Y%m%d%H%M%S%6N")
298
295
  "#{@main_alias}-#{ts}"
299
296
  end
300
297
 
@@ -3,7 +3,7 @@ module Elasticity
3
3
  class SingleIndex
4
4
  STATUSES = [:missing, :ok]
5
5
 
6
- def initialize(client, index_name, document_type, use_new_timestamp_format = false, include_type_name_on_create = true)
6
+ def initialize(client, index_name, document_type, use_new_timestamp_format = true, include_type_name_on_create = true)
7
7
  @client = client
8
8
  @index_name = index_name
9
9
  @document_type = document_type
@@ -11,7 +11,7 @@ module Elasticity
11
11
  # included for compatibility with v7
12
12
  @include_type_name_on_create = include_type_name_on_create
13
13
 
14
- # not currently used. included for argument compatiblity with AliasStrategy
14
+ # Deprecated: The use_new_timestamp_format option is no longer used and will be removed in the next version.
15
15
  @use_new_timestamp_format = use_new_timestamp_format
16
16
  end
17
17
 
@@ -99,7 +99,7 @@ module Elasticity
99
99
  end
100
100
 
101
101
  def mapping
102
- @client.index_get_mapping(index: @index_name, type: @document_type).values.first
102
+ @client.index_get_mapping(index: @index_name, type: @document_type, include_type_name: @include_type_name_on_create).values.first
103
103
  rescue Elasticsearch::Transport::Transport::Errors::NotFound
104
104
  nil
105
105
  end
@@ -1,3 +1,3 @@
1
1
  module Elasticity
2
- VERSION = "0.13.5"
2
+ VERSION = "0.14.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.13.5
4
+ version: 0.14.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: 2020-05-28 00:00:00.000000000 Z
11
+ date: 2022-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.7'
19
+ version: 2.3.4
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.7'
26
+ version: 2.3.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: byebug
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -170,74 +170,80 @@ dependencies:
170
170
  requirements:
171
171
  - - ">="
172
172
  - !ruby/object:Gem::Version
173
- version: 4.0.0
173
+ version: 5.2.0
174
174
  - - "<"
175
175
  - !ruby/object:Gem::Version
176
- version: '7'
176
+ version: '7.1'
177
177
  type: :runtime
178
178
  prerelease: false
179
179
  version_requirements: !ruby/object:Gem::Requirement
180
180
  requirements:
181
181
  - - ">="
182
182
  - !ruby/object:Gem::Version
183
- version: 4.0.0
183
+ version: 5.2.0
184
184
  - - "<"
185
185
  - !ruby/object:Gem::Version
186
- version: '7'
186
+ version: '7.1'
187
187
  - !ruby/object:Gem::Dependency
188
188
  name: activerecord
189
189
  requirement: !ruby/object:Gem::Requirement
190
190
  requirements:
191
191
  - - ">="
192
192
  - !ruby/object:Gem::Version
193
- version: 4.0.0
193
+ version: 5.2.0
194
194
  - - "<"
195
195
  - !ruby/object:Gem::Version
196
- version: '7'
196
+ version: '7.1'
197
197
  type: :runtime
198
198
  prerelease: false
199
199
  version_requirements: !ruby/object:Gem::Requirement
200
200
  requirements:
201
201
  - - ">="
202
202
  - !ruby/object:Gem::Version
203
- version: 4.0.0
203
+ version: 5.2.0
204
204
  - - "<"
205
205
  - !ruby/object:Gem::Version
206
- version: '7'
206
+ version: '7.1'
207
207
  - !ruby/object:Gem::Dependency
208
208
  name: activesupport
209
209
  requirement: !ruby/object:Gem::Requirement
210
210
  requirements:
211
211
  - - ">="
212
212
  - !ruby/object:Gem::Version
213
- version: 4.0.0
213
+ version: 5.2.0
214
214
  - - "<"
215
215
  - !ruby/object:Gem::Version
216
- version: '7'
216
+ version: '7.1'
217
217
  type: :runtime
218
218
  prerelease: false
219
219
  version_requirements: !ruby/object:Gem::Requirement
220
220
  requirements:
221
221
  - - ">="
222
222
  - !ruby/object:Gem::Version
223
- version: 4.0.0
223
+ version: 5.2.0
224
224
  - - "<"
225
225
  - !ruby/object:Gem::Version
226
- version: '7'
226
+ version: '7.1'
227
227
  - !ruby/object:Gem::Dependency
228
228
  name: elasticsearch
229
229
  requirement: !ruby/object:Gem::Requirement
230
230
  requirements:
231
231
  - - ">="
232
232
  - !ruby/object:Gem::Version
233
- version: '1.0'
233
+ version: '7'
234
+ - - "<"
235
+ - !ruby/object:Gem::Version
236
+ version: '8'
234
237
  type: :runtime
235
238
  prerelease: false
236
239
  version_requirements: !ruby/object:Gem::Requirement
237
240
  requirements:
238
241
  - - ">="
239
242
  - !ruby/object:Gem::Version
240
- version: '1.0'
243
+ version: '7'
244
+ - - "<"
245
+ - !ruby/object:Gem::Version
246
+ version: '8'
241
247
  description: Elasticity provides a higher level abstraction on top of [elasticsearch-ruby](https://github.com/elasticsearch/elasticsearch-ruby)
242
248
  gem
243
249
  email:
@@ -271,7 +277,6 @@ files:
271
277
  - lib/elasticity/multi_search.rb
272
278
  - lib/elasticity/multi_search_response_parser.rb
273
279
  - lib/elasticity/railtie.rb
274
- - lib/elasticity/scrollable_search.rb
275
280
  - lib/elasticity/search.rb
276
281
  - lib/elasticity/segmented_document.rb
277
282
  - lib/elasticity/strategies.rb
@@ -299,7 +304,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
299
304
  - !ruby/object:Gem::Version
300
305
  version: '0'
301
306
  requirements: []
302
- rubygems_version: 3.1.2
307
+ rubygems_version: 3.3.11
303
308
  signing_key:
304
309
  specification_version: 4
305
310
  summary: ActiveModel-based library for working with Elasticsearch
@@ -1,15 +0,0 @@
1
- module Elasticity
2
- class ScrollableSearch
3
- def self.search_type
4
- if elasticsearch_gem_version < Gem::Version.create("2.0")
5
- :scan
6
- else
7
- :query_then_fetch
8
- end
9
- end
10
-
11
- def self.elasticsearch_gem_version
12
- Gem.loaded_specs["elasticsearch"].version
13
- end
14
- end
15
- end