es-elasticity 0.12.0 → 0.13.3.pre1

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
- SHA1:
3
- metadata.gz: affbf27c1edb733d94a8e47e2081e15e4f6a1b24
4
- data.tar.gz: 6cc26c4485266ea6fcac7210cc49204eeaf804bf
2
+ SHA256:
3
+ metadata.gz: 28ca60421ff53aec3c241f9a963800932b73e79479e96f3f9df6f70f6445ebf0
4
+ data.tar.gz: 1b57fe5f540982badc6200dd00ee69332dc4859696a0f6e7e4b58f6ab6d3ee86
5
5
  SHA512:
6
- metadata.gz: fe6dc007658a6364ccacc71305f1f72156c05206c20e48f77a70314e05485de84537eb8bd9f99ecfcbaf84b4fdad916a203ac5820b094eda46a7463c70df159b
7
- data.tar.gz: cdf109a324e17b044808efa20865aad86f2873c62deef66b59d5577d4ba2b3c76f9a646e41643dfa8d15110545734ff2b6551ef739ecc74b2f150e0248039cb4
6
+ metadata.gz: c02a2c7b199cdab1e068094299337d2b605538997215f5e08a1b0db0ba3e398ebf56cf3bc37900cbfda492afb5cc8344f893a62b053a45dea48caa60079362b3
7
+ data.tar.gz: dc11d61c8ad152d3d733e1dd6866b27e3f6ae6010c6204f83016cfb60931390ab419670b8f3b49f6f922a1649d900dc356825471eabe05b277691d9890cba611
@@ -0,0 +1,223 @@
1
+ version: 2.1
2
+
3
+ orbs:
4
+ gem: doximity/gem-publisher@dev:3673d17
5
+
6
+ executors:
7
+
8
+ # used for building the gem
9
+ ruby-latest:
10
+ resource_class: small
11
+ docker:
12
+ - image: circleci/ruby:latest
13
+ environment:
14
+ BUNDLE_VERSION: "~> 1.17"
15
+
16
+ # used for testing the gem:
17
+ ruby_2_5:
18
+ resource_class: small
19
+ docker:
20
+ - image: circleci/ruby:2.5
21
+ environment:
22
+ BUNDLE_VERSION: "~> 1.17"
23
+ - image: elastic/elasticsearch:6.8.2
24
+ environment:
25
+ - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
26
+ - discovery.type=single-node
27
+ - xpack.security.enabled=false
28
+ ruby_2_6:
29
+ resource_class: small
30
+ docker:
31
+ - image: circleci/ruby:2.6
32
+ environment:
33
+ BUNDLE_VERSION: "~> 1.17"
34
+ - image: elastic/elasticsearch:6.8.2
35
+ environment:
36
+ - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
37
+ - discovery.type=single-node
38
+ - xpack.security.enabled=false
39
+ ruby_2_7:
40
+ resource_class: small
41
+ docker:
42
+ - image: circleci/ruby:2.7
43
+ environment:
44
+ BUNDLE_VERSION: "~> 1.17"
45
+ - image: elastic/elasticsearch:6.8.2
46
+ environment:
47
+ - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
48
+ - discovery.type=single-node
49
+ - xpack.security.enabled=false
50
+
51
+ # yaml anchor filters
52
+ master_only: &master_only
53
+ filters:
54
+ branches:
55
+ only: master
56
+ tags:
57
+ ignore: /.*/
58
+ pr_only: &pr_only
59
+ filters:
60
+ branches:
61
+ ignore: master
62
+ tags:
63
+ ignore: /.*/
64
+ version_tags_only: &version_tags_only
65
+ filters:
66
+ branches:
67
+ ignore: /.*/
68
+ tags:
69
+ only: /^v.*/
70
+
71
+ jobs:
72
+ build_2_5:
73
+ executor: ruby_2_5
74
+ steps:
75
+ - checkout
76
+ - run:
77
+ name: Install Bundler specific version
78
+ command: |
79
+ gem install bundler --version "${BUNDLE_VERSION}" --force
80
+ - restore_cache:
81
+ keys:
82
+ - v1-bundle-ruby_2_5-{{ checksum "Gemfile.lock" }}
83
+ - run:
84
+ name: Install Ruby Dependencies
85
+ command: bundle check --path=vendor/bundle || bundle install --local --frozen --path=vendor/bundle --jobs=4 --retry=3
86
+ - save_cache:
87
+ key: v1-bundle-ruby_2_5-{{ checksum "Gemfile.lock" }}
88
+ paths:
89
+ - vendor/bundle
90
+ - run:
91
+ name: Wait for ElasticSearch
92
+ command: dockerize -wait http://127.0.0.1:9200 -timeout 1m
93
+ - run:
94
+ name: Run Tests
95
+ command: bundle exec rspec
96
+ - persist_to_workspace:
97
+ root: .
98
+ paths:
99
+ - vendor/bundle
100
+ build_2_6:
101
+ executor: ruby_2_6
102
+ steps:
103
+ - checkout
104
+ - run:
105
+ name: Install Bundler specific version
106
+ command: |
107
+ gem install bundler --version "${BUNDLE_VERSION}" --force
108
+ - restore_cache:
109
+ keys:
110
+ - v1-bundle-ruby_2_6-{{ checksum "Gemfile.lock" }}
111
+ - run:
112
+ name: Install Ruby Dependencies
113
+ command: bundle check --path=vendor/bundle || bundle install --local --frozen --path=vendor/bundle --jobs=4 --retry=3
114
+ - save_cache:
115
+ key: v1-bundle-ruby_2_6-{{ checksum "Gemfile.lock" }}
116
+ paths:
117
+ - vendor/bundle
118
+ - run:
119
+ name: Wait for ElasticSearch
120
+ command: dockerize -wait http://127.0.0.1:9200 -timeout 1m
121
+ - run:
122
+ name: Run Tests
123
+ command: bundle exec rspec
124
+ - persist_to_workspace:
125
+ root: .
126
+ paths:
127
+ - vendor/bundle
128
+ build_2_7:
129
+ executor: ruby_2_7
130
+ steps:
131
+ - checkout
132
+ - run:
133
+ name: Install Bundler specific version
134
+ command: |
135
+ gem install bundler --version "${BUNDLE_VERSION}" --force
136
+ - restore_cache:
137
+ keys:
138
+ - v1-bundle-ruby_2_7-{{ checksum "Gemfile.lock" }}
139
+ - run:
140
+ name: Install Ruby Dependencies
141
+ command: bundle check --path=vendor/bundle || bundle install --local --frozen --path=vendor/bundle --jobs=4 --retry=3
142
+ - save_cache:
143
+ key: v1-bundle-ruby_2_7-{{ checksum "Gemfile.lock" }}
144
+ paths:
145
+ - vendor/bundle
146
+ - run:
147
+ name: Wait for ElasticSearch
148
+ command: dockerize -wait http://127.0.0.1:9200 -timeout 1m
149
+ - run:
150
+ name: Run Tests
151
+ command: bundle exec rspec
152
+ - persist_to_workspace:
153
+ root: .
154
+ paths:
155
+ - vendor/bundle
156
+
157
+ workflows:
158
+ version: 2
159
+ trunk:
160
+ jobs:
161
+ - build_2_5:
162
+ <<: *master_only
163
+ - build_2_6:
164
+ <<: *master_only
165
+ - build_2_7:
166
+ <<: *master_only
167
+ - gem/build:
168
+ <<: *master_only
169
+ executor: ruby-latest
170
+ name: gem-build
171
+ requires:
172
+ - build_2_5
173
+
174
+ pull-requests:
175
+ jobs:
176
+ - build_2_5:
177
+ <<: *pr_only
178
+ - build_2_6:
179
+ <<: *pr_only
180
+ - build_2_7:
181
+ <<: *pr_only
182
+ - gem/build:
183
+ <<: *pr_only
184
+ executor: ruby-latest
185
+ name: gem-build
186
+ requires:
187
+ - build_2_5
188
+ - pre-release-approval:
189
+ <<: *pr_only
190
+ type: approval
191
+ requires:
192
+ - gem-build
193
+ - gem/publish:
194
+ <<: *pr_only
195
+ name: gem-publish
196
+ to_rubygems: true
197
+ pre_release: true
198
+ requires:
199
+ - pre-release-approval
200
+ context: artifact_publishing
201
+
202
+ final-release:
203
+ jobs:
204
+ - build_2_5:
205
+ <<: *version_tags_only
206
+ - build_2_6:
207
+ <<: *version_tags_only
208
+ - build_2_7:
209
+ <<: *version_tags_only
210
+ - gem/build:
211
+ <<: *version_tags_only
212
+ executor: ruby-latest
213
+ name: gem-build
214
+ requires:
215
+ - build_2_5
216
+ - gem/publish:
217
+ <<: *version_tags_only
218
+ name: gem-publish
219
+ to_rubygems: true
220
+ pre_release: false
221
+ requires:
222
+ - gem-build
223
+ context: artifact_publishing
data/.gitignore CHANGED
@@ -1,16 +1,19 @@
1
+ *.a
2
+ *.bundle
3
+ *.log
4
+ *.o
5
+ *.so
6
+ .DS_Store
7
+ .rspec_status
8
+ /*.gem
1
9
  /.bundle/
10
+ /.ruby-version
2
11
  /.yardoc
3
- /Gemfile.lock
4
12
  /_yardoc/
5
13
  /coverage/
6
14
  /doc/
7
15
  /pkg/
8
16
  /spec/reports/
9
17
  /tmp/
10
- *.bundle
11
- *.so
12
- *.o
13
- *.a
18
+ /vendor/bundle/
14
19
  mkmf.log
15
- *.log
16
- .DS_Store
data/.rubocop.yml ADDED
@@ -0,0 +1,23 @@
1
+ ---
2
+ inherit_gem:
3
+ dox-style:
4
+ - ".rubocop.yml"
5
+
6
+ Env/UseFetch:
7
+ Exclude:
8
+ - "./bin/*"
9
+
10
+ Metrics/BlockLength:
11
+ Exclude:
12
+ - "./**/*_spec*.rb"
13
+ - "./*.gemspec"
14
+ - "./spec/*_helper*.rb"
15
+ - "Gemfile"
16
+
17
+ Metrics/ModuleLength:
18
+ Exclude:
19
+ - "./**/*_spec*.rb"
20
+
21
+ Metrics/MethodLength:
22
+ Exclude:
23
+ - "./**/*_spec*.rb"
data/CHANGELOG.md ADDED
@@ -0,0 +1,143 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.13.3.pre1] - 2020-01-30
10
+ ### Changed
11
+ - Release on RubyGems using gem-publisher CircleCI Orb
12
+
13
+ ## [0.13.2] - 2020-01-29
14
+ ### Changed
15
+ - Release on Nexus using gem-publisher CircleCI Orb
16
+ - Packing gems
17
+ - bump the version for testing the Nexus repo
18
+
19
+ ## [0.13.1]
20
+ ### Changed
21
+ - remove superfluous 'to_ary' delegation that was causing issues downstream
22
+
23
+ ## [0.13.0]
24
+ ### Changed
25
+ - changes needed for use with Elasticsearch v7
26
+ - handle the v7 "total" as an object rather than a scalar
27
+ - use timestamp with no colons
28
+ - update elasticsearch gem version for consistency with target ES version
29
+ - expose refresh_index to force write (because in v7, flush no longer forces writes)
30
+ - allow for optional 'include_type_name_on_create' arg so that the :include_type_name can be passed
31
+
32
+ ## [0.12.1]
33
+ ### Changed
34
+ - use Arel.sql to avoid unsafe sql and eliminate deprecation warnings when used in Rails projects
35
+
36
+ ## [0.12.0]
37
+ ### Changed
38
+ - warn when configuring a index with subclasses if using ES version that does support them
39
+ - raise exception when creating or adding document to an index configured with subclasses if using an ES version that does not support them
40
+
41
+ ## [0.11.5]
42
+ ### Changed
43
+ - Give the option of retrying the deletion for certain exceptions during remap
44
+
45
+ ## [0.11.4]
46
+ ### Changed
47
+ - Fully clean up if error occurs during remap (assign all aliases back to original index)
48
+
49
+ ## [0.11.3]
50
+ ### Added
51
+ - Adds support for preserving the order or normalized names of `highlight` through `highlighted_attrs`
52
+
53
+ ## [0.11.2]
54
+ ### Added
55
+ - Adds support for passing arguments to Search definition through `search(query, search_args)` in index searching and msearch
56
+ - adds `_explanation` to hold value of returned explanations in the base document
57
+
58
+ ## [0.11.1]
59
+ ### Changed
60
+ - support `action.destructive_requires_name` setting by being explict about which indices to delete
61
+
62
+ ## [0.11.0]
63
+ ### Changed
64
+ - compatibilty with ES v6
65
+ - change mappings for 'index' to boolean. "string" type was replaced with "text"
66
+ - use "successful" from API response ('created' was removed)
67
+ - stringify keys for :mappings so clients can use symbol keys
68
+
69
+ ## [0.10.0]
70
+ ### Changed
71
+ - update remap to removing fields from the mapping that are not explicitly defined.
72
+
73
+ ## [0.9.1]
74
+ ### Changed
75
+ - fix search enumerator, missing first result set
76
+
77
+ ## [0.8.3]
78
+ ### Changed
79
+ - fix remap method to use the scan api properly.
80
+
81
+ ## [0.8.2]
82
+ ### Changed
83
+ - fix scan api to work with more recent versions of elasticsearch ruby.
84
+
85
+ ## [0.8.1]
86
+ ### Changed
87
+ - loosen support for elasticsearch-ruby versions to support more versions of elasticsearch
88
+
89
+ ## [0.8.0]
90
+ ### Changed
91
+ - Make Elasticity::Strategies::AliasIndex the default
92
+ - Use mapping instead of mappings, we wanna be consistent to ES not to elasticsearch-ruby
93
+ - Better automatic index name and document type
94
+
95
+ ## [v0.7.1]
96
+ ### Added
97
+ - add more response info to raised exceptions from reindexing
98
+
99
+ ## [v0.6.5]
100
+ ### Changed
101
+ - update search and multi search interfaces to allow passing of general search definition arguments found in https://github.com/elastic/elasticsearch-ruby/blob/bdf5e145e5acc21726dddcd34492debbbddde568/elasticsearch-api/lib/elasticsearch/api/actions/search.rb#L125-L162
102
+
103
+ ## [v0.6.4]
104
+ ### Changed
105
+ - update suggestions to pull from the proper key
106
+
107
+ ## [v0.6.3]
108
+ ### Added
109
+ - add next_page and previous_page to be compatible with will_paginate interface
110
+
111
+ ## [0.6.2]
112
+ ### Changed
113
+ - update multi search `[]` method to raise an exception with key name to make it easier to debug failed queries within a multi search hash.
114
+
115
+ ## [0.6.0]
116
+ ### Changed
117
+ - Change documents to be able to define indexes with multiple doc types. A Document class can define subclasses which are of different doc_types and all live in the same index's mappings.
118
+ - updated search queries to pass either a list of document types or a single document type.
119
+ - Update documents to generate a default document_type from the class name so that Documents always have a document type. You'll still usually want to manually define the document type, but it's no longer necessary.
120
+
121
+ ## [0.5.2]
122
+ ### Added
123
+ - Add aggregations to multi_search
124
+
125
+ ## [0.5.1]
126
+ ### Added
127
+ - Add ability to reindex individual attributes of a document using the bulk_update API.
128
+
129
+ ## [v0.5.0]
130
+ ### Changed
131
+ - Refactor of multisearch and search facade
132
+ - Searches no longer return a simple array, they now return the Search::Results object which proxies array and is enumerable.
133
+
134
+ ### Added
135
+ - add Search::Results proxy object so pagination and meta data methods can be standardize across all responses
136
+
137
+ ## [v0.4.5]
138
+ ### Changed
139
+ - Fix issue with hash strings and pagination
140
+
141
+ ## [v0.4.4]
142
+ ### Added
143
+ - Added support for surfacing document `_score` on query results.
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
- source 'https://rubygems.org'
1
+ # frozen_string_literal: true
2
+ #
3
+ # BEFORE changing this file, read https://wiki.doximity.com/articles/gemfile-maintenance
4
+ source "https://artifacts.dox.support/repository/gems"
2
5
 
3
- # Specify your gem's dependencies in elasticity.gemspec
4
6
  gemspec
5
-
6
- gem "elasticsearch", "5.0.4"
data/Gemfile.lock ADDED
@@ -0,0 +1,94 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ es-elasticity (0.13.3.pre1)
5
+ activemodel (>= 4.0.0, < 6)
6
+ activerecord (>= 4.0.0, < 6)
7
+ activesupport (>= 4.0.0, < 6)
8
+ elasticsearch (>= 1.0)
9
+
10
+ GEM
11
+ remote: https://artifacts.dox.support/repository/gems/
12
+ specs:
13
+ activemodel (5.2.4)
14
+ activesupport (= 5.2.4)
15
+ activerecord (5.2.4)
16
+ activemodel (= 5.2.4)
17
+ activesupport (= 5.2.4)
18
+ arel (>= 9.0)
19
+ activesupport (5.2.4)
20
+ concurrent-ruby (~> 1.0, >= 1.0.2)
21
+ i18n (>= 0.7, < 2)
22
+ minitest (~> 5.1)
23
+ tzinfo (~> 1.1)
24
+ arel (9.0.0)
25
+ byebug (11.0.1)
26
+ codeclimate-test-reporter (1.0.9)
27
+ simplecov (<= 0.13)
28
+ coderay (1.1.2)
29
+ concurrent-ruby (1.1.5)
30
+ diff-lcs (1.3)
31
+ elasticsearch (7.2.0)
32
+ elasticsearch-api (= 7.2.0)
33
+ elasticsearch-transport (= 7.2.0)
34
+ elasticsearch-api (7.2.0)
35
+ multi_json
36
+ elasticsearch-transport (7.2.0)
37
+ faraday
38
+ multi_json
39
+ faraday (0.17.1)
40
+ multipart-post (>= 1.2, < 3)
41
+ i18n (1.7.0)
42
+ concurrent-ruby (~> 1.0)
43
+ method_source (0.9.2)
44
+ minitest (5.13.0)
45
+ multi_json (1.14.1)
46
+ multipart-post (2.1.1)
47
+ oj (3.10.0)
48
+ pry (0.12.2)
49
+ coderay (~> 1.1.0)
50
+ method_source (~> 0.9.0)
51
+ rake (10.5.0)
52
+ redis (4.1.3)
53
+ rspec (3.1.0)
54
+ rspec-core (~> 3.1.0)
55
+ rspec-expectations (~> 3.1.0)
56
+ rspec-mocks (~> 3.1.0)
57
+ rspec-core (3.1.7)
58
+ rspec-support (~> 3.1.0)
59
+ rspec-expectations (3.1.2)
60
+ diff-lcs (>= 1.2.0, < 2.0)
61
+ rspec-support (~> 3.1.0)
62
+ rspec-mocks (3.1.3)
63
+ rspec-support (~> 3.1.0)
64
+ rspec-support (3.1.2)
65
+ rspec_junit_formatter (0.4.1)
66
+ rspec-core (>= 2, < 4, != 2.12.0)
67
+ simplecov (0.7.1)
68
+ multi_json (~> 1.0)
69
+ simplecov-html (~> 0.7.1)
70
+ simplecov-html (0.7.1)
71
+ thread_safe (0.3.6)
72
+ timecop (0.9.1)
73
+ tzinfo (1.2.5)
74
+ thread_safe (~> 0.1)
75
+
76
+ PLATFORMS
77
+ ruby
78
+
79
+ DEPENDENCIES
80
+ bundler (~> 1.7)
81
+ byebug
82
+ codeclimate-test-reporter
83
+ es-elasticity!
84
+ oj
85
+ pry
86
+ rake (~> 10.0)
87
+ redis
88
+ rspec (~> 3.1.0)
89
+ rspec_junit_formatter
90
+ simplecov (~> 0.7.1)
91
+ timecop
92
+
93
+ BUNDLED WITH
94
+ 1.17.3