chewy 5.2.0 → 6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +36 -10
- data/CHANGELOG.md +219 -326
- data/Gemfile +1 -1
- data/README.md +9 -21
- data/chewy.gemspec +1 -1
- data/gemfiles/rails.6.1.activerecord.gemfile +1 -1
- data/lib/chewy/config.rb +2 -20
- data/lib/chewy/fields/base.rb +0 -6
- data/lib/chewy/index.rb +2 -0
- data/lib/chewy/index/actions.rb +5 -1
- data/lib/chewy/multi_search.rb +62 -0
- data/lib/chewy/search.rb +1 -4
- data/lib/chewy/search/pagination/will_paginate.rb +1 -1
- data/lib/chewy/search/parameters/none.rb +1 -3
- data/lib/chewy/search/request.rb +25 -24
- data/lib/chewy/search/scrolling.rb +4 -1
- data/lib/chewy/type.rb +4 -1
- data/lib/chewy/type/adapter/orm.rb +6 -3
- data/lib/chewy/type/import.rb +1 -0
- data/lib/chewy/type/syncer.rb +4 -5
- data/lib/chewy/type/witchcraft.rb +3 -1
- data/lib/chewy/type/wrapper.rb +11 -1
- data/lib/chewy/version.rb +1 -1
- data/migration_guide.md +18 -0
- data/spec/chewy/config_spec.rb +0 -21
- data/spec/chewy/index/actions_spec.rb +24 -0
- data/spec/chewy/index_spec.rb +16 -39
- data/spec/chewy/journal_spec.rb +21 -17
- data/spec/chewy/minitest/search_index_receiver_spec.rb +11 -9
- data/spec/chewy/multi_search_spec.rb +85 -0
- data/spec/chewy/rake_helper_spec.rb +102 -87
- data/spec/chewy/rspec/update_index_spec.rb +47 -46
- data/spec/chewy/runtime_spec.rb +2 -2
- data/spec/chewy/search/parameters/indices_spec.rb +6 -7
- data/spec/chewy/search/parameters/none_spec.rb +1 -1
- data/spec/chewy/search/parameters_spec.rb +1 -1
- data/spec/chewy/search/request_spec.rb +82 -67
- data/spec/chewy/search/response_spec.rb +19 -15
- data/spec/chewy/search/scrolling_spec.rb +25 -16
- data/spec/chewy/search_spec.rb +45 -41
- data/spec/chewy/stash_spec.rb +14 -12
- data/spec/chewy/type/adapter/active_record_spec.rb +13 -1
- data/spec/chewy/type/import/bulk_builder_spec.rb +9 -94
- data/spec/chewy/type/import/journal_builder_spec.rb +9 -7
- data/spec/chewy/type/mapping_spec.rb +3 -1
- data/spec/chewy/type/witchcraft_spec.rb +15 -0
- data/spec/chewy/type/wrapper_spec.rb +3 -1
- data/spec/chewy_spec.rb +0 -7
- data/spec/spec_helper.rb +0 -7
- data/spec/support/active_record.rb +20 -0
- metadata +8 -78
- data/LEGACY_DSL.md +0 -497
- data/gemfiles/ruby3.gemfile +0 -10
- data/lib/chewy/query.rb +0 -1142
- data/lib/chewy/query/compose.rb +0 -68
- data/lib/chewy/query/criteria.rb +0 -191
- data/lib/chewy/query/filters.rb +0 -244
- data/lib/chewy/query/loading.rb +0 -110
- data/lib/chewy/query/nodes/and.rb +0 -25
- data/lib/chewy/query/nodes/base.rb +0 -17
- data/lib/chewy/query/nodes/bool.rb +0 -34
- data/lib/chewy/query/nodes/equal.rb +0 -34
- data/lib/chewy/query/nodes/exists.rb +0 -20
- data/lib/chewy/query/nodes/expr.rb +0 -28
- data/lib/chewy/query/nodes/field.rb +0 -110
- data/lib/chewy/query/nodes/has_child.rb +0 -15
- data/lib/chewy/query/nodes/has_parent.rb +0 -15
- data/lib/chewy/query/nodes/has_relation.rb +0 -59
- data/lib/chewy/query/nodes/match_all.rb +0 -11
- data/lib/chewy/query/nodes/missing.rb +0 -20
- data/lib/chewy/query/nodes/not.rb +0 -25
- data/lib/chewy/query/nodes/or.rb +0 -25
- data/lib/chewy/query/nodes/prefix.rb +0 -19
- data/lib/chewy/query/nodes/query.rb +0 -20
- data/lib/chewy/query/nodes/range.rb +0 -63
- data/lib/chewy/query/nodes/raw.rb +0 -15
- data/lib/chewy/query/nodes/regexp.rb +0 -35
- data/lib/chewy/query/nodes/script.rb +0 -20
- data/lib/chewy/query/pagination.rb +0 -25
- data/spec/chewy/query/criteria_spec.rb +0 -700
- data/spec/chewy/query/filters_spec.rb +0 -201
- data/spec/chewy/query/loading_spec.rb +0 -124
- data/spec/chewy/query/nodes/and_spec.rb +0 -12
- data/spec/chewy/query/nodes/bool_spec.rb +0 -14
- data/spec/chewy/query/nodes/equal_spec.rb +0 -32
- data/spec/chewy/query/nodes/exists_spec.rb +0 -18
- data/spec/chewy/query/nodes/has_child_spec.rb +0 -59
- data/spec/chewy/query/nodes/has_parent_spec.rb +0 -59
- data/spec/chewy/query/nodes/match_all_spec.rb +0 -11
- data/spec/chewy/query/nodes/missing_spec.rb +0 -16
- data/spec/chewy/query/nodes/not_spec.rb +0 -14
- data/spec/chewy/query/nodes/or_spec.rb +0 -12
- data/spec/chewy/query/nodes/prefix_spec.rb +0 -16
- data/spec/chewy/query/nodes/query_spec.rb +0 -12
- data/spec/chewy/query/nodes/range_spec.rb +0 -32
- data/spec/chewy/query/nodes/raw_spec.rb +0 -11
- data/spec/chewy/query/nodes/regexp_spec.rb +0 -43
- data/spec/chewy/query/nodes/script_spec.rb +0 -15
- data/spec/chewy/query/pagination/kaminari_spec.rb +0 -5
- data/spec/chewy/query/pagination/will_paginate_spec.rb +0 -5
- data/spec/chewy/query/pagination_spec.rb +0 -39
- data/spec/chewy/query_spec.rb +0 -637
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d885732170ee400be6fc8df2f567afb384e752235edaf57ae58624f6907fb0d
|
4
|
+
data.tar.gz: 9d1aa6212b67c16a3e6cb7e4fec7c9b76ac768099d0717fbe97f16c1930584af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c1809614999dc9c8e8f4ac0763e4aca663fa7f118bc4cedf17f7bef255f8161b19cfc94daeb34dfb2729dc68756726f647013ce63bc77d9596255b07b153239
|
7
|
+
data.tar.gz: 73ad27cef56399d39974d837eb374279f1a9cbd84e6103c9d4aba6e151d0200f3b63075056b6ebff02e9c7d06bda1bd3ea4ab736e683cb60353b537da52757ea
|
data/.circleci/config.yml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
|
2
2
|
version: 2.1
|
3
3
|
|
4
|
-
|
4
|
+
es-env: &es-env
|
5
5
|
cluster.name: elasticsearch
|
6
6
|
transport.host: localhost
|
7
7
|
network.host: 127.0.0.1
|
@@ -23,6 +23,8 @@ workflows:
|
|
23
23
|
- rspec-ruby-27-activerecord52
|
24
24
|
- rspec-ruby-27-mongoid
|
25
25
|
- rspec-ruby-30-activerecord61
|
26
|
+
- rspec-ruby-27-activerecord61-es6
|
27
|
+
- rspec-ruby-30-activerecord61-es6
|
26
28
|
|
27
29
|
commands:
|
28
30
|
rspec-test:
|
@@ -108,7 +110,7 @@ jobs:
|
|
108
110
|
- image: circleci/ruby:2.6
|
109
111
|
- image: docker.elastic.co/elasticsearch/elasticsearch:5.6.7
|
110
112
|
environment:
|
111
|
-
<<: *
|
113
|
+
<<: *es-env
|
112
114
|
working_directory: ~/repo
|
113
115
|
environment:
|
114
116
|
GEMFILE: gemfiles/rails.5.2.activerecord.gemfile
|
@@ -120,7 +122,7 @@ jobs:
|
|
120
122
|
- image: circleci/ruby:2.6
|
121
123
|
- image: docker.elastic.co/elasticsearch/elasticsearch:5.6.7
|
122
124
|
environment:
|
123
|
-
<<: *
|
125
|
+
<<: *es-env
|
124
126
|
working_directory: ~/repo
|
125
127
|
environment:
|
126
128
|
GEMFILE: gemfiles/rails.6.0.activerecord.gemfile
|
@@ -132,7 +134,7 @@ jobs:
|
|
132
134
|
- image: circleci/ruby:2.6
|
133
135
|
- image: docker.elastic.co/elasticsearch/elasticsearch:5.6.7
|
134
136
|
environment:
|
135
|
-
<<: *
|
137
|
+
<<: *es-env
|
136
138
|
working_directory: ~/repo
|
137
139
|
environment:
|
138
140
|
GEMFILE: gemfiles/rails.6.1.activerecord.gemfile
|
@@ -145,7 +147,7 @@ jobs:
|
|
145
147
|
- image: circleci/mongo:4.2.5
|
146
148
|
- image: docker.elastic.co/elasticsearch/elasticsearch:5.6.7
|
147
149
|
environment:
|
148
|
-
<<: *
|
150
|
+
<<: *es-env
|
149
151
|
working_directory: ~/repo
|
150
152
|
environment:
|
151
153
|
GEMFILE: gemfiles/rails.5.2.mongoid.6.4.gemfile
|
@@ -157,7 +159,7 @@ jobs:
|
|
157
159
|
- image: circleci/ruby:2.7
|
158
160
|
- image: docker.elastic.co/elasticsearch/elasticsearch:5.6.7
|
159
161
|
environment:
|
160
|
-
<<: *
|
162
|
+
<<: *es-env
|
161
163
|
working_directory: ~/repo
|
162
164
|
environment:
|
163
165
|
GEMFILE: gemfiles/rails.5.2.activerecord.gemfile
|
@@ -169,7 +171,7 @@ jobs:
|
|
169
171
|
- image: circleci/ruby:2.7
|
170
172
|
- image: docker.elastic.co/elasticsearch/elasticsearch:5.6.7
|
171
173
|
environment:
|
172
|
-
<<: *
|
174
|
+
<<: *es-env
|
173
175
|
working_directory: ~/repo
|
174
176
|
environment:
|
175
177
|
GEMFILE: gemfiles/rails.6.0.activerecord.gemfile
|
@@ -181,7 +183,7 @@ jobs:
|
|
181
183
|
- image: circleci/ruby:2.7
|
182
184
|
- image: docker.elastic.co/elasticsearch/elasticsearch:5.6.7
|
183
185
|
environment:
|
184
|
-
<<: *
|
186
|
+
<<: *es-env
|
185
187
|
working_directory: ~/repo
|
186
188
|
environment:
|
187
189
|
GEMFILE: gemfiles/rails.6.1.activerecord.gemfile
|
@@ -194,7 +196,7 @@ jobs:
|
|
194
196
|
- image: circleci/mongo:4.2.5
|
195
197
|
- image: docker.elastic.co/elasticsearch/elasticsearch:5.6.7
|
196
198
|
environment:
|
197
|
-
<<: *
|
199
|
+
<<: *es-env
|
198
200
|
working_directory: ~/repo
|
199
201
|
environment:
|
200
202
|
GEMFILE: gemfiles/rails.5.2.mongoid.6.4.gemfile
|
@@ -206,7 +208,31 @@ jobs:
|
|
206
208
|
- image: circleci/ruby:3.0
|
207
209
|
- image: docker.elastic.co/elasticsearch/elasticsearch:5.6.7
|
208
210
|
environment:
|
209
|
-
<<: *
|
211
|
+
<<: *es-env
|
212
|
+
working_directory: ~/repo
|
213
|
+
environment:
|
214
|
+
GEMFILE: gemfiles/rails.6.1.activerecord.gemfile
|
215
|
+
steps:
|
216
|
+
- rspec-test
|
217
|
+
|
218
|
+
rspec-ruby-27-activerecord61-es6:
|
219
|
+
docker:
|
220
|
+
- image: circleci/ruby:2.7
|
221
|
+
- image: docker.elastic.co/elasticsearch/elasticsearch:6.8.13
|
222
|
+
environment:
|
223
|
+
<<: *es-env
|
224
|
+
working_directory: ~/repo
|
225
|
+
environment:
|
226
|
+
GEMFILE: gemfiles/rails.6.1.activerecord.gemfile
|
227
|
+
steps:
|
228
|
+
- rspec-test
|
229
|
+
|
230
|
+
rspec-ruby-30-activerecord61-es6:
|
231
|
+
docker:
|
232
|
+
- image: circleci/ruby:3.0
|
233
|
+
- image: docker.elastic.co/elasticsearch/elasticsearch:6.8.13
|
234
|
+
environment:
|
235
|
+
<<: *es-env
|
210
236
|
working_directory: ~/repo
|
211
237
|
environment:
|
212
238
|
GEMFILE: gemfiles/rails.6.1.activerecord.gemfile
|
data/CHANGELOG.md
CHANGED
@@ -1,234 +1,177 @@
|
|
1
1
|
# master
|
2
2
|
|
3
|
-
# Version
|
3
|
+
# Version 6.0.0 (2021-02-11)
|
4
4
|
|
5
|
-
##
|
6
|
-
|
7
|
-
* Add support for Ruby 3 (@lowang, #734)
|
5
|
+
## Breaking changes
|
8
6
|
|
9
|
-
*
|
7
|
+
* [#743](https://github.com/toptal/chewy/pull/743): Elasticsearch 6.x support added. See [migration guide](migration_guide.md) & ES [breaking changes](https://www.elastic.co/guide/en/elasticsearch/reference/6.8/breaking-changes-6.0.html). Removed legacy DSL support. Removed support for ES < 5 ([@mrzasa][], [@konalegi][], [@rabotyaga][])
|
10
8
|
|
11
|
-
|
9
|
+
## Bug fixes
|
12
10
|
|
13
|
-
*
|
11
|
+
* [#695](https://github.com/toptal/chewy/pull/695): Clear the scroll by id after completing scroll_batches ([@socialchorus][])
|
12
|
+
* [#749](https://github.com/toptal/chewy/pull/749): Avoid importing everything when given an empty relation ([@JF-Lalonde][], [@dalthon][])
|
13
|
+
* [#736](https://github.com/toptal/chewy/pull/736): Fix nil children when using witchcraft ([@taylor-au][])
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
* Fix more ruby 2.7 keyword params deprecation warnings (@aglushkov, #728)
|
18
|
-
|
19
|
-
* Fixed all deprecation warnings in Ruby 2.7 (@gseddon, #715)
|
15
|
+
## Changes
|
20
16
|
|
21
|
-
*
|
17
|
+
* [#751](https://github.com/toptal/chewy/pull/751): Add [Multi Search API](https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-multi-search.html) support ([@mpeychich][], [@dalthon][])
|
18
|
+
* [#755](https://github.com/toptal/chewy/pull/755): `attribute_highlights` returns an array of highlights ([@musaffa][], [@dalthon][])
|
19
|
+
* [#753](https://github.com/toptal/chewy/pull/753): Add support for direct_import parameter to skip objects reloading ([@TikiTDO][], [@dalthon][])
|
20
|
+
* [#739](https://github.com/toptal/chewy/pull/739): Remove explicit `main` branch dependencies on rspec* gems after `rspec-mocks` 3.10.2 is released ([@rabotyaga][])
|
22
21
|
|
23
|
-
|
22
|
+
# Version 5.2.0 (2021-01-28)
|
24
23
|
|
25
|
-
|
24
|
+
## Changes
|
26
25
|
|
27
|
-
*
|
26
|
+
* [#734](https://github.com/toptal/chewy/pull/734): Add support for Ruby 3 ([@lowang][])
|
27
|
+
* [#735](https://github.com/toptal/chewy/pull/735): Correct deprecation warning for Elasticsearch 5.6 to 6: empty query for`_delete_by_query`, delete by alias, `index_already_exists_exception` renaming ([@bhacaz][])
|
28
|
+
* [#733](https://github.com/toptal/chewy/pull/733): Update gemspec dependencies for Rails. Update CI gemfiles and matrix to tests against current LTS Rails versions. ([@bhacaz][])
|
29
|
+
* Tweak some wording and formatting; add a note about compatibility; update copyright; remove broken logo; update the CI badge ([@bbatsov][])
|
30
|
+
* [#714](https://github.com/toptal/chewy/pull/714): Update instructions for AWS ElasticSearch ([@olancheg][])
|
31
|
+
* [#728](https://github.com/toptal/chewy/pull/728): Fix more ruby 2.7 keyword params deprecation warnings ([@aglushkov][])
|
32
|
+
* [#715](https://github.com/toptal/chewy/pull/715): Fixed all deprecation warnings in Ruby 2.7 ([@gseddon][])
|
33
|
+
* [#718](https://github.com/toptal/chewy/pull/718): Added Ruby 2.7 to CircleCI config ([@mrzasa][])
|
34
|
+
* [#707](https://github.com/toptal/chewy/pull/707): Allow configuration of Active Job queue name ([@mrzasa][])
|
35
|
+
* [#711](https://github.com/toptal/chewy/pull/711): Setup CI on CircleCI ([@mrzasa][])
|
36
|
+
* [#710](https://github.com/toptal/chewy/pull/710): Fix deprecation warning for contructing new BigDecimal ([@AlexVPopov][])
|
28
37
|
|
29
|
-
# Version 5.1.0
|
38
|
+
# Version 5.1.0 (2019-09-24)
|
30
39
|
|
31
40
|
## Breaking changes
|
32
41
|
|
33
|
-
* Add support for multiple indices in request (@pyromaniac
|
34
|
-
|
35
|
-
* Support `search_type`, `request_cache`, and `allow_partial_search_results` as query string parameters (@mattzollinhofer, #647)
|
42
|
+
* [#657](https://github.com/toptal/chewy/pull/657): Add support for multiple indices in request ([@pyromaniac][])
|
43
|
+
* [#647](https://github.com/toptal/chewy/pull/647): Support `search_type`, `request_cache`, and `allow_partial_search_results` as query string parameters ([@mattzollinhofer][])
|
36
44
|
|
37
45
|
## Changes
|
38
46
|
|
39
|
-
* Speed up imports when `bulk_size` is specified (@yahooguntu
|
47
|
+
* [#606](https://github.com/toptal/chewy/pull/606): Speed up imports when `bulk_size` is specified ([@yahooguntu][])
|
48
|
+
* [#682](https://github.com/toptal/chewy/pull/682): Insert `RequestStrategy` middleware before `ActionDispatch::ShowExceptions` ([@dck][])
|
40
49
|
|
41
|
-
|
42
|
-
|
43
|
-
# Version 5.0.0
|
50
|
+
# Version 5.0.0 (2018-02-13)
|
44
51
|
|
45
52
|
## Breaking changes
|
46
53
|
|
47
54
|
* Try to align the gem version with the ElasticSearch version we support
|
48
|
-
|
49
55
|
* `Chewy.default_field_type` is `text` now.
|
50
|
-
|
51
56
|
* `Chewy::Stash` was split onto two indexes - `Chewy::Stash::Specification` and `Chewy::Stash::Journal`
|
52
|
-
|
53
57
|
* Data for journal and specification is stored in binary fields base64-encoded to bypass the limits of other fields.
|
54
|
-
|
55
|
-
* Don't underscore suggested index name (@dm1try, #626)
|
58
|
+
* [#626](https://github.com/toptal/chewy/pull/626): Don't underscore suggested index name ([@dm1try][])
|
56
59
|
|
57
60
|
## Changes
|
58
61
|
|
59
|
-
* `pipeline` import option support (@eManPrague
|
60
|
-
|
61
|
-
*
|
62
|
-
|
63
|
-
* Bypass strategy performance improvements (@DNNX, #623)
|
64
|
-
|
65
|
-
* Avoid index update calls for empty data (@robertasg, #620)
|
66
|
-
|
62
|
+
* [#598](https://github.com/toptal/chewy/pull/598): `pipeline` import option support ([@eManPrague][])
|
63
|
+
* [#625](https://github.com/toptal/chewy/pull/625): Proper Rails check ([@nattfodd][])
|
64
|
+
* [#623](https://github.com/toptal/chewy/pull/623): Bypass strategy performance improvements ([@DNNX][])
|
65
|
+
* [#620](https://github.com/toptal/chewy/pull/620): Avoid index update calls for empty data ([@robertasg][])
|
67
66
|
* Do not underscore suggested index name on `Chewy::Index.index_name` call.
|
68
|
-
|
69
67
|
* It is possible now to call `root` method several times inside a single type definition, the options will be merged. Also, the block isn't required anymore.
|
70
|
-
|
71
|
-
* Fixed some Sequel deprecation warnings (@
|
68
|
+
* [#565](https://github.com/toptal/chewy/pull/565): Fixed some Sequel deprecation warnings ([@arturtr][])
|
69
|
+
* [#577](https://github.com/toptal/chewy/pull/577): Fixed some Sequel deprecation warnings ([@matchbookmac][])
|
72
70
|
|
73
71
|
## Bugfixes
|
74
72
|
|
75
|
-
* Fixed index settings logic error (@yahooguntu
|
76
|
-
|
77
|
-
* Missed check in higlight method (@heartfulbird, #567)
|
73
|
+
* [#593](https://github.com/toptal/chewy/pull/593): Fixed index settings logic error ([@yahooguntu][])
|
74
|
+
* [#567](https://github.com/toptal/chewy/pull/567): Missed check in higlight method ([@heartfulbird][])
|
78
75
|
|
79
76
|
# Version 0.10.1
|
80
77
|
|
81
78
|
## Changes
|
82
79
|
|
83
|
-
* Improved parallel worker titles
|
80
|
+
* [#558](https://github.com/toptal/chewy/pull/558): Improved parallel worker titles
|
84
81
|
|
85
82
|
## Bugfixes
|
86
83
|
|
87
|
-
* Fixed request strategy initial debug message
|
88
|
-
|
89
|
-
* Fixed
|
90
|
-
|
91
|
-
* Fixed fields symbol/string value (#555)
|
92
|
-
|
93
|
-
* Fixed root field value proc (#554)
|
84
|
+
* [#557](https://github.com/toptal/chewy/pull/557): Fixed request strategy initial debug message
|
85
|
+
* [#556](https://github.com/toptal/chewy/pull/556): Fixed will objects paginated array initialization when pagination was not used
|
86
|
+
* [#555](https://github.com/toptal/chewy/pull/555): Fixed fields symbol/string value
|
87
|
+
* [#554](https://github.com/toptal/chewy/pull/554): Fixed root field value proc
|
94
88
|
|
95
89
|
# Version 0.10.0
|
96
90
|
|
97
91
|
## Breaking changes
|
98
92
|
|
99
93
|
* Changed behavior of `Chewy::Index.index_name`, it doesn't cache the values anymore.
|
100
|
-
|
101
94
|
* Journal interfaces, related code and rake tasks were completely refactored and are not compatible with the previous version.
|
102
95
|
|
103
96
|
## Changes
|
104
97
|
|
105
|
-
* Less noisy strategies logging (@Borzik
|
106
|
-
|
98
|
+
* [#543](https://github.com/toptal/chewy/pull/543): Less noisy strategies logging ([@Borzik][])
|
107
99
|
* Parallel import and the corresponding rake tasks.
|
108
|
-
|
109
|
-
* `:shoryuken` async strategy (@josephchoe, #532)
|
110
|
-
|
100
|
+
* [#532](https://github.com/toptal/chewy/pull/532): `:shoryuken` async strategy ([@josephchoe][])
|
111
101
|
* Deprecate `Chewy::Index.build_index_name`.
|
112
|
-
|
113
102
|
* Rename `Chewy::Index.default_prefix` to `Chewy::Index.prefix`. The old one is deprecated.
|
114
|
-
|
115
103
|
* Add `Chewy::Type.derivable_name` for consistency.
|
116
|
-
|
117
104
|
* Rename `Chewy::Index.derivable_index_name` to `Chewy::Index.derivable_name`.
|
118
105
|
`Chewy::Index.derivable_index_name` and `Chewy::Type.derivable_index_name` are deprecated.
|
119
|
-
|
120
106
|
* Use normal YAML loading, for the config, we don't need the safe one.
|
121
|
-
|
122
|
-
* `default_root_options` option (@barthez, #526)
|
123
|
-
|
107
|
+
* [#526](https://github.com/toptal/chewy/pull/526): `default_root_options` option ([@barthez][])
|
124
108
|
* Partial indexing ability: it is possible to update only specified fields.
|
125
|
-
|
126
109
|
* New cool `rake chewy:deploy` task.
|
127
|
-
|
128
110
|
* Selective reset (resets only if necessary): `rake chewy:upgrade`.
|
129
|
-
|
130
111
|
* Consistency checks and synchronization: `rake chewy:sync`.
|
131
|
-
|
132
112
|
* Brand new request DSL. Supports ElasticSearch 2 and 5, better usability, architecture and docs.
|
133
|
-
|
134
113
|
* Add Kaminari 1.0 support.
|
135
|
-
|
136
|
-
*
|
137
|
-
|
138
|
-
*
|
139
|
-
|
140
|
-
* Bulk indexing optimizations with new additional options (@eproulx-petalmd, #467)
|
141
|
-
|
142
|
-
* Configurable sidekiq options (@averell23, #438)
|
114
|
+
* [#483](https://github.com/toptal/chewy/pull/483): `skip_index_creation_on_import` option ([@sergey-kintsel][])
|
115
|
+
* [#481](https://github.com/toptal/chewy/pull/481): Ability to use procs for settings ([@parallel588][])
|
116
|
+
* [#467](https://github.com/toptal/chewy/pull/467): Bulk indexing optimizations with new additional options ([@eproulx-petalmd][])
|
117
|
+
* [#438](https://github.com/toptal/chewy/pull/438): Configurable sidekiq options ([@averell23][])
|
143
118
|
|
144
119
|
# Version 0.9.0
|
145
120
|
|
146
121
|
## Changes
|
147
122
|
|
148
|
-
* Add `preference` param to Query (@menglewis
|
149
|
-
|
150
|
-
*
|
151
|
-
|
152
|
-
*
|
153
|
-
|
154
|
-
* [
|
155
|
-
|
156
|
-
*
|
157
|
-
|
158
|
-
* `Chewy::Query#unlimited` to fetch all the documents (@sergey-kintsel, #393)
|
159
|
-
|
160
|
-
* `Chewy::Query#exists?` (@sergey-kintsel, #386)
|
161
|
-
|
162
|
-
* Import otimizations (#381, #376)
|
163
|
-
|
164
|
-
* Additional import optimization technique - [raw import](https://github.com/toptal/chewy/#raw-import) (@DNNX, #375)
|
165
|
-
|
166
|
-
* `weight` scoring dunction was added to the search DSL (@sevab, #380)
|
167
|
-
|
123
|
+
* [#443](https://github.com/toptal/chewy/pull/443): Add `preference` param to Query ([@menglewis][])
|
124
|
+
* [#417](https://github.com/toptal/chewy/pull/417): Add the `track_scores` option to the query; `_score` to be computed and tracked even when there are no `_score` in sort. ([@dmitry][])
|
125
|
+
* [#414](https://github.com/toptal/chewy/pull/414), [#433](https://github.com/toptal/chewy/pull/433), [#439](https://github.com/toptal/chewy/pull/439): Confugurable `Chewy.indices_path` ([@robacarp][])
|
126
|
+
* [#409](https://github.com/toptal/chewy/pull/409), [#425](https://github.com/toptal/chewy/pull/425), [#428](https://github.com/toptal/chewy/pull/428), [#432](https://github.com/toptal/chewy/pull/432), [#434](https://github.com/toptal/chewy/pull/434), [#463](https://github.com/toptal/chewy/pull/463): [Journaling](https://github.com/toptal/chewy/#journaling) implementation ([@sergey-kintsel][])
|
127
|
+
* [#396](https://github.com/toptal/chewy/pull/396): Minitest helpers ([@robacarp][])
|
128
|
+
* [#393](https://github.com/toptal/chewy/pull/393): `Chewy::Query#unlimited` to fetch all the documents ([@sergey-kintsel][])
|
129
|
+
* [#386](https://github.com/toptal/chewy/pull/386): `Chewy::Query#exists?` ([@sergey-kintsel][])
|
130
|
+
* [#381](https://github.com/toptal/chewy/pull/381), [#376](https://github.com/toptal/chewy/pull/376): Import otimizations
|
131
|
+
* [#375](https://github.com/toptal/chewy/pull/375): Additional import optimization technique - [raw import](https://github.com/toptal/chewy/#raw-import) ([@DNNX][])
|
132
|
+
* [#380](https://github.com/toptal/chewy/pull/380): `weight` scoring dunction was added to the search DSL ([@sevab][])
|
168
133
|
* Rake tasks support multiple indexes and exceptions: `rake chewy:reset[users,projects]`, `rake chewy:update[-projects]`
|
169
|
-
|
170
134
|
* Witchcraft™ supports dynamically generated procs with variables from closure.
|
171
|
-
|
172
|
-
* Added `Query#preference` for specifying shard replicas to query against. (@menglewis)
|
135
|
+
* Added `Query#preference` for specifying shard replicas to query against. ([@menglewis][])
|
173
136
|
|
174
137
|
## Bugfixes
|
175
138
|
|
176
|
-
* `.script_fields` method in the Index class (@dmitry
|
177
|
-
|
178
|
-
*
|
179
|
-
|
180
|
-
* Sequesl custom primary keys handling fix (@okliv, #385)
|
181
|
-
|
182
|
-
* Bulk import fixes (@0x0badc0de, #374)
|
139
|
+
* [#415](https://github.com/toptal/chewy/pull/415): `.script_fields` method in the Index class ([@dmitry][])
|
140
|
+
* [#398](https://github.com/toptal/chewy/pull/398): Fix routing_missing_exception on delete with parent missing ([@guigs][])
|
141
|
+
* [#385](https://github.com/toptal/chewy/pull/385): Sequel custom primary keys handling fix ([@okliv][])
|
142
|
+
* [#374](https://github.com/toptal/chewy/pull/374): Bulk import fixes ([@0x0badc0de][])
|
183
143
|
|
184
144
|
# Version 0.8.4
|
185
145
|
|
186
146
|
## Changes
|
187
147
|
|
188
148
|
* Brand new import `:bulk_size` option, set desired ElasticSearch bulk size in bytes
|
189
|
-
|
190
149
|
* Witchcraft™ technology
|
191
|
-
|
192
|
-
*
|
193
|
-
|
194
|
-
* Various codebase optimizations (@DNNX, @pyromaniac)
|
195
|
-
|
150
|
+
* [#341](https://github.com/toptal/chewy/pull/341): Configurable per-type default import options ([@barthez][])
|
151
|
+
* Various codebase optimizations ([@DNNX][], [@pyromaniac][])
|
196
152
|
* `update_index` Rspec matcher messages improvements
|
197
|
-
|
198
153
|
* `:all` rake tasks deprecation
|
199
|
-
|
200
|
-
*
|
201
|
-
|
202
|
-
*
|
203
|
-
|
204
|
-
* Prefix is configurable per-index (@mikeyhogarth, #314)
|
205
|
-
|
206
|
-
* Ability to pass proc for transport configuration (@feymartynov, @reidab, #302, #339)
|
207
|
-
|
208
|
-
* ElasticSearch 2 support (@sergeygaychuk, #297)
|
209
|
-
|
154
|
+
* [#335](https://github.com/toptal/chewy/pull/335): Scoped notification subscriptions in rake tasks ([@0x0badc0de][])
|
155
|
+
* [#321](https://github.com/toptal/chewy/pull/321): Async strategies workers accept options ([@dnd][])
|
156
|
+
* [#314](https://github.com/toptal/chewy/pull/314): Prefix is configurable per-index ([@mikeyhogarth][])
|
157
|
+
* [#302](https://github.com/toptal/chewy/pull/302), [#339](https://github.com/toptal/chewy/pull/339): Ability to pass proc for transport configuration ([@feymartynov][], [@reidab][])
|
158
|
+
* [#297](https://github.com/toptal/chewy/pull/297): ElasticSearch 2 support ([@sergeygaychuk][])
|
210
159
|
* Accessing types with methods is deprecated. Use `MyIndex::MyType` constant reference instead of `MyIndex.my_type` method.
|
211
|
-
|
212
|
-
* Sequel adapter improvements (@mrbrdo, #294)
|
160
|
+
* [#294](https://github.com/toptal/chewy/pull/294): Sequel adapter improvements ([@mrbrdo][])
|
213
161
|
|
214
162
|
## Bugfixes
|
215
163
|
|
216
|
-
* Mongoid atomic strategy fix
|
217
|
-
|
218
|
-
*
|
219
|
-
|
220
|
-
*
|
221
|
-
|
222
|
-
* Better errors handling in strategies (@barthez, #306)
|
223
|
-
|
224
|
-
* Assets strategies silencer fix for Rails 5 API mode (@clupprich, #303)
|
164
|
+
* [#325](https://github.com/toptal/chewy/pull/325): Mongoid atomic strategy fix
|
165
|
+
* [#324](https://github.com/toptal/chewy/pull/324): Method missing fix ([@jesjos][])
|
166
|
+
* [#319](https://github.com/toptal/chewy/pull/319): Hash fields composition fix ([@eproulx-petalmd][])
|
167
|
+
* [#306](https://github.com/toptal/chewy/pull/306): Better errors handling in strategies ([@barthez][])
|
168
|
+
* [#303](https://github.com/toptal/chewy/pull/303): Assets strategies silencer fix for Rails 5 API mode ([@clupprich][])
|
225
169
|
|
226
170
|
# Version 0.8.3
|
227
171
|
|
228
172
|
## Breaking changes:
|
229
173
|
|
230
174
|
* `Chewy.atomic` and `Chewy.urgent_update=` methods was removed from the codebase, use `Chewy.strategy` block instead.
|
231
|
-
|
232
175
|
* `delete_from_index?` hook is removed from the codebase.
|
233
176
|
|
234
177
|
## Changes
|
@@ -238,37 +181,24 @@
|
|
238
181
|
## Bugfixes
|
239
182
|
|
240
183
|
* Sequel objects transactional destruction fix
|
241
|
-
|
242
|
-
* Correct Rspec mocking framework checking (@mainameiz)
|
243
|
-
|
184
|
+
* Correct Rspec mocking framework checking ([@mainameiz][])
|
244
185
|
* Atomic strategy is now compatible with custom ids proc.
|
245
|
-
|
246
|
-
*
|
247
|
-
|
248
|
-
* Correct custom assets path silencer (@davekaro)
|
186
|
+
* Safe unsubscribe on import ([@marshall-lee][])
|
187
|
+
* Correct custom assets path silencer ([@davekaro][])
|
249
188
|
|
250
189
|
# Version 0.8.2
|
251
190
|
|
252
191
|
## Changes
|
253
192
|
|
254
|
-
* ActiveJob strategy by @mkcode
|
255
|
-
|
256
|
-
*
|
257
|
-
|
258
|
-
*
|
259
|
-
|
260
|
-
*
|
261
|
-
|
262
|
-
*
|
263
|
-
|
264
|
-
* Sequel adapter by @jirutka
|
265
|
-
|
266
|
-
* Rake helper methods extracted (@caldwecr, @jirutka)
|
267
|
-
|
268
|
-
* Multiple grammar fixes (@henrebotha)
|
269
|
-
|
270
|
-
* Ability to pass a proc to `update_index` to define updating index dynamically (@SeTeM)
|
271
|
-
|
193
|
+
* ActiveJob strategy by [@mkcode][]
|
194
|
+
* Async strategies tweak ([@AndreySavelyev][])
|
195
|
+
* GeoPoint readme ([@joonty][])
|
196
|
+
* Multiple grammar fixes and code improvements ([@biow0lf][])
|
197
|
+
* Named aggregations by [@caldwecr][]
|
198
|
+
* Sequel adapter by [@jirutka][]
|
199
|
+
* Rake helper methods extracted ([@caldwecr][], [@jirutka][])
|
200
|
+
* Multiple grammar fixes ([@henrebotha][])
|
201
|
+
* Ability to pass a proc to `update_index` to define updating index dynamically ([@SeTeM][])
|
272
202
|
|
273
203
|
## Bugfixes
|
274
204
|
|
@@ -289,64 +219,39 @@
|
|
289
219
|
## Changes
|
290
220
|
|
291
221
|
* Crutches™ technology
|
292
|
-
|
293
|
-
*
|
294
|
-
|
295
|
-
* `update_index` matcher mocha support (@lardawge)
|
296
|
-
|
222
|
+
* Added `.script_fields` chainable method to query ([@ka8725][])
|
223
|
+
* `update_index` matcher mocha support ([@lardawge][])
|
297
224
|
* `:resque` async strategy
|
298
|
-
|
299
|
-
*
|
300
|
-
|
301
|
-
* Added `Query#search_type` for `search_type` request option setup (@marshall-lee)
|
225
|
+
* `:sidekiq` async strategy (inspired by [@sharkzp][])
|
226
|
+
* Added `Query#search_type` for `search_type` request option setup ([@marshall-lee][])
|
302
227
|
|
303
228
|
## Bugfixes
|
304
229
|
|
305
230
|
* Rails 4.2 migrations are not raising UndefinedUpdateStrategy anymore on data updates
|
306
|
-
|
307
|
-
* Mongoid random failing specs fixes (@marshall-lee)
|
231
|
+
* Mongoid random failing specs fixes ([@marshall-lee][])
|
308
232
|
|
309
233
|
# Version 0.7.0
|
310
234
|
|
311
235
|
## Breaking changes:
|
312
236
|
|
313
|
-
* `Chewy.use_after_commit_callbacks = false` returns previous RDBMS behavior
|
314
|
-
in tests
|
315
|
-
|
237
|
+
* `Chewy.use_after_commit_callbacks = false` returns previous RDBMS behavior in tests
|
316
238
|
* ActiveRecord import is now called after_commit instead of after_save and after_destroy
|
317
|
-
|
318
239
|
* Import now respects default scope and removes unmatched documents
|
319
|
-
|
320
240
|
* `delete_from_index?` method is deprecated, use
|
321
|
-
|
322
241
|
```ruby
|
323
242
|
define_type User, delete_if: ->{ removed? } do
|
324
243
|
...
|
325
244
|
end
|
326
245
|
```
|
327
|
-
|
328
246
|
* `Chewy.request_strategy` to configure action controller's request wrapping strategy
|
329
|
-
|
330
247
|
* `Chewy.root_strategy` to configure the first strategy in stack
|
331
|
-
|
332
248
|
* Default strategy for controller actions is `:atomic`
|
333
|
-
|
334
249
|
* Default strategy for activerecord migrations is `:bypass`
|
335
|
-
|
336
250
|
* Default strategy for sandbox console is `:bypass`
|
337
|
-
|
338
251
|
* Default strategy for rails console is `:urgent`
|
339
|
-
|
340
252
|
* `Chewy.configuration` was renamed to `Chewy.settings`
|
341
|
-
|
342
|
-
*
|
343
|
-
and `Chewy.urgent_update` are now deprecated in favour of the new
|
344
|
-
`Chewy.strategy` API.
|
345
|
-
|
346
|
-
* Loading objects for object-sourced types using `wrap` method is
|
347
|
-
deprecated, `load_one` method should be used instead. Or method name
|
348
|
-
might be passed to `define_type`:
|
349
|
-
|
253
|
+
* Reworked index update strategies implementation. `Chewy.atomic` and `Chewy.urgent_update` are now deprecated in favour of the new `Chewy.strategy` API.
|
254
|
+
* Loading objects for object-sourced types using `wrap` method is deprecated, `load_one` method should be used instead. Or method name might be passed to `define_type`:
|
350
255
|
```ruby
|
351
256
|
class GeoData
|
352
257
|
def self.get_data(elasticsearch_document)
|
@@ -362,12 +267,9 @@
|
|
362
267
|
|
363
268
|
## Changes
|
364
269
|
|
365
|
-
* Multiple enhancements by @DNNX
|
366
|
-
|
367
|
-
* Added `script_fields` to search criteria (@ka8725)
|
368
|
-
|
270
|
+
* Multiple enhancements by [@DNNX][]
|
271
|
+
* Added `script_fields` to search criteria ([@ka8725][])
|
369
272
|
* ORM adapters now completely relies on the default scope. This means every scope or objects passed to import are merged with default scope so basically there is no need to define `delete_if` block. Default scope strongly restricts objects which may land in the current index.
|
370
|
-
|
371
273
|
```ruby
|
372
274
|
define_type Country.where("rating > 30") do
|
373
275
|
|
@@ -380,11 +282,7 @@
|
|
380
282
|
CountriesIndex::Country.import(Country.where("rating < 50").to_a)
|
381
283
|
CountriesIndex::Country.import(Country.where("rating < 50").pluck(:id))
|
382
284
|
```
|
383
|
-
|
384
|
-
* Object adapter supports custom initial import and load methods, so it
|
385
|
-
could be configured to be used with procs or any class responding to `call`
|
386
|
-
method.
|
387
|
-
|
285
|
+
* Object adapter supports custom initial import and load methods, so it could be configured to be used with procs or any class responding to `call` method.
|
388
286
|
```ruby
|
389
287
|
class GeoData
|
390
288
|
def self.call
|
@@ -397,9 +295,7 @@
|
|
397
295
|
...
|
398
296
|
end
|
399
297
|
```
|
400
|
-
|
401
298
|
* Nested fields value procs additional arguments: parent objects.
|
402
|
-
|
403
299
|
```ruby
|
404
300
|
define_type Country do
|
405
301
|
field :name
|
@@ -408,52 +304,44 @@
|
|
408
304
|
end
|
409
305
|
end
|
410
306
|
```
|
411
|
-
|
412
307
|
* Implemented basic named scopes
|
413
308
|
|
414
309
|
## Bugfixes
|
415
310
|
|
416
|
-
* `script_score` allow options (@joeljunstrom)
|
417
|
-
|
418
|
-
* Chewy indexes eaged loading fixes (@leemhenson)
|
419
|
-
|
311
|
+
* `script_score` allow options ([@joeljunstrom][])
|
312
|
+
* Chewy indexes eaged loading fixes ([@leemhenson][])
|
420
313
|
* `Chewy::Index.import nil` imports nothing instead of initial data
|
421
314
|
|
422
315
|
# Version 0.6.2
|
423
316
|
|
424
317
|
## Changes
|
425
318
|
|
426
|
-
* document root id custom value option (@baronworks)
|
319
|
+
* document root id custom value option ([@baronworks][])
|
427
320
|
|
428
321
|
## Bugfixes
|
429
322
|
|
430
|
-
* Removed decay function defaults (@Linuus)
|
431
|
-
|
323
|
+
* Removed decay function defaults ([@Linuus][])
|
432
324
|
* Correct config file handling in case of empty file
|
433
325
|
|
434
326
|
# Version 0.6.1
|
435
327
|
|
436
328
|
## Changes
|
437
329
|
|
438
|
-
* `min_score` query option support (@jshirley)
|
439
|
-
|
330
|
+
* `min_score` query option support ([@jshirley][])
|
440
331
|
* `Chewy::Query#find` method for finding documents by id
|
441
332
|
|
442
333
|
# Version 0.6.0
|
443
334
|
|
444
335
|
## Changes
|
445
336
|
|
446
|
-
* Mongoid support YaY! (@fabiotomio, @leemhenson)
|
447
|
-
|
337
|
+
* Mongoid support YaY! ([@fabiotomio][], [@leemhenson][])
|
448
338
|
* `urgent: true` option for `update_index` is deprecated and will be removed soon, use `Chewy.atomic` instead
|
449
|
-
|
450
|
-
*
|
451
|
-
|
452
|
-
* will_paginate support (@josecoelho)
|
339
|
+
* `timeout` and `timed_out` support ([@MarkMurphy][])
|
340
|
+
* will_paginate support ([@josecoelho][])
|
453
341
|
|
454
342
|
## Bugfixes
|
455
343
|
|
456
|
-
* All the query chainable methods delegated to indexes and types (partially @Linuus)
|
344
|
+
* All the query chainable methods delegated to indexes and types (partially [@Linuus][])
|
457
345
|
|
458
346
|
# Version 0.5.2
|
459
347
|
|
@@ -467,118 +355,82 @@
|
|
467
355
|
|
468
356
|
## Bugfixes:
|
469
357
|
|
470
|
-
* Advanced type classes resolving (@inbeom)
|
471
|
-
|
358
|
+
* Advanced type classes resolving ([@inbeom][])
|
472
359
|
* `import` ignores nil
|
473
360
|
|
474
361
|
# Version 0.5.1
|
475
362
|
|
476
363
|
## Changes:
|
477
364
|
|
478
|
-
* `chewy.yml` Rails generator (@jirikolarik)
|
479
|
-
|
480
|
-
* Parent-child mappings feature support (@inbeom)
|
481
|
-
|
365
|
+
* `chewy.yml` Rails generator ([@jirikolarik][])
|
366
|
+
* Parent-child mappings feature support ([@inbeom][])
|
482
367
|
* `Chewy::Index.total_count` and `Chewy::Type::Base.total_count`
|
483
|
-
|
484
|
-
* `Chewy::
|
485
|
-
|
486
|
-
*
|
487
|
-
|
488
|
-
* Rspec 3 `update_index` matcher support (@jimmybaker)
|
489
|
-
|
490
|
-
* Implemented function scoring (@averell23)
|
368
|
+
* `Chewy::Type::Base.reset` method. Deletes all the type documents and performs import ([@jondavidford][])
|
369
|
+
* Added `Chewy::Query#delete_all` scope method using delete by query ES feature ([@jondavidford][])
|
370
|
+
* Rspec 3 `update_index` matcher support ([@jimmybaker][])
|
371
|
+
* Implemented function scoring ([@averell23][])
|
491
372
|
|
492
373
|
## Bugfixes:
|
493
374
|
|
494
|
-
* Indexed eager-loading fix (@leemhenson)
|
495
|
-
|
496
|
-
* Field type deriving nested type support fix (@rschellhorn)
|
375
|
+
* Indexed eager-loading fix ([@leemhenson][])
|
376
|
+
* Field type deriving nested type support fix ([@rschellhorn][])
|
497
377
|
|
498
378
|
# Version 0.5.0
|
499
379
|
|
500
380
|
## Breaking changes:
|
501
381
|
|
502
382
|
* 404 exception (IndexMissingException) while query is swallowed and treated like an empty result set.
|
503
|
-
|
504
383
|
* `load` and `preload` for queries became lazy. Might be partially incompatible.
|
505
|
-
|
506
384
|
* Changed mapping behavior: multi-fields are defined in conformity with ElasticSearch documentation (http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/_multi_fields.html#_multi_fields)
|
507
385
|
|
508
386
|
## Changes:
|
509
387
|
|
510
|
-
* `suggest` query options support (@rschellhorn).
|
511
|
-
|
388
|
+
* `suggest` query options support ([@rschellhorn][]).
|
512
389
|
* Added hash data support. How it is possible to pass hashes to import.
|
513
|
-
|
514
390
|
* `rake chewy:reset` and `rake chewy:update` paramless acts as `rake chewy:reset:all` and `rake chewy:update:all` respectively
|
515
|
-
|
516
391
|
* Added `delete_from_index?` API method for custom deleted objects marking.
|
517
|
-
|
518
392
|
* Added `post_filter` API, working the same way as filters.
|
519
|
-
|
520
393
|
* Added chainable `strategy` query method.
|
521
|
-
|
522
394
|
* Aliasing is performed in index create request for ElasticSearch >= 1.1.
|
523
|
-
|
524
395
|
* `preload` scope method loads ORM/ODM objects in background.
|
525
|
-
|
526
396
|
* `load` method `:only` and `:except` options to specify load types.
|
527
|
-
|
528
397
|
* `highlight` and `rescore` query options support.
|
529
|
-
|
530
398
|
* config/chewy.yml ERB support.
|
531
399
|
|
532
400
|
## Bugfixes:
|
533
401
|
|
534
402
|
* Fixed `missing` and `exists` filters DSL constructors.
|
535
|
-
|
536
403
|
* Reworked index data composing.
|
537
|
-
|
538
|
-
* Support for Kaminari new PaginatableArray behavior (@leemhenson)
|
539
|
-
|
404
|
+
* Support for Kaminari new PaginatableArray behavior ([@leemhenson][])
|
540
405
|
* Correct waiting for status. After index creation, bulk import, and deletion.
|
541
|
-
|
542
|
-
* Fix #23 "wrong constant name" with namespace models
|
406
|
+
* [#23](https://github.com/toptal/chewy/pull/23): Fix "wrong constant name" with namespace models
|
543
407
|
|
544
408
|
# Version 0.4.0
|
545
409
|
|
546
410
|
* Changed `update_index` matcher behavior. Now it compare array attributes position-independently.
|
547
|
-
|
548
|
-
* Search aggregations API support (@arion).
|
549
|
-
|
411
|
+
* Search aggregations API support ([@arion][]).
|
550
412
|
* Chewy::Query#facets called without params performs the request and returns facets.
|
551
|
-
|
552
413
|
* Added `Type.template` DSL method for root objects dynamic templates definition. See [mapping.rb](lib/chewy/type/mapping.rb) for more details.
|
553
|
-
|
554
|
-
* ActiveRecord adapter custom `primary_key` support (@matthee).
|
555
|
-
|
414
|
+
* ActiveRecord adapter custom `primary_key` support ([@matthee][]).
|
556
415
|
* Urgent update now clears association cache in ActiveRecord to ensure latest changes are imported.
|
557
|
-
|
558
416
|
* `import` now creates index before performing.
|
559
|
-
|
560
417
|
* `Chewy.configuration[:wait_for_status]` option. Can be set to `red`, `yellow` or `green`. If set - chewy will wait for cluster status before creating, deleting index and import. Useful for specs.
|
561
418
|
|
562
419
|
# Version 0.3.0
|
563
420
|
|
564
421
|
* Added `Chewy.configuration[:index]` config to setup common indexes options.
|
565
|
-
|
566
422
|
* `Chewy.client_options` replaced with `Chewy.configuration`
|
567
|
-
|
568
423
|
* Using source filtering instead of fields filter (http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-source-filtering.html).
|
569
424
|
|
570
425
|
# Version 0.2.3
|
571
426
|
|
572
427
|
* `.import!` indexes method, raises import errors.
|
573
|
-
|
574
428
|
* `.import!` types method, raises import errors. Useful for specs.
|
575
429
|
|
576
430
|
# Version 0.2.2
|
577
431
|
|
578
|
-
* Support for `none` scope (@undr).
|
579
|
-
|
580
|
-
* Auto-resolved analyzers and analyzers repository (@webgago):
|
581
|
-
|
432
|
+
* Support for `none` scope ([@undr][]).
|
433
|
+
* Auto-resolved analyzers and analyzers repository ([@webgago][]):
|
582
434
|
```ruby
|
583
435
|
# Setting up analyzers repository:
|
584
436
|
Chewy.analyzer :title_analyzer, type: 'custom', filter: %w(lowercase icu_folding title_nysiis)
|
@@ -589,33 +441,22 @@
|
|
589
441
|
settings analysis: {analyzer: ['title_analyzer', {one_more_analyzer: {type: 'custom', tokenizer: 'lowercase'}}]}
|
590
442
|
end
|
591
443
|
```
|
592
|
-
|
593
444
|
`title_analyzer` here will be automatically resolved and passed to index mapping
|
594
445
|
|
595
446
|
# Version 0.2.0
|
596
447
|
|
597
448
|
* Reworked import error handling. Now all the import errors from ElasticSearch are handled properly, also import method returns true of false depending on the import process success.
|
598
|
-
|
599
449
|
* `Chewy::Index.import` now takes types hash as argument within options hash:
|
600
450
|
|
601
451
|
`PlacesIndex.import city: City.enabled, country: Country.enabled, refresh: false`
|
602
|
-
|
603
452
|
* Old indexes cleanup after reset.
|
604
|
-
|
605
453
|
* Added index prefixes.
|
606
|
-
|
607
454
|
* `define_type` now takes options for adapter.
|
608
|
-
|
609
455
|
* `chewy:reset` and `chewy:reset:all` rake tasks are now trying to reset index with zero downtime if it is possible.
|
610
|
-
|
611
456
|
* Added `chewy:update:all` rake task.
|
612
|
-
|
613
457
|
* Methods `.create`, `.create!`, `.delete`, `.delete`, `reset!` are now supports index name suffix passing as the first argument. See [actions.rb](lib/chewy/index/actions.rb) for more details.
|
614
|
-
|
615
458
|
* Method `reset` renamed to `reset!`.
|
616
|
-
|
617
459
|
* Added common loading scope for AR adapter. Also removed scope proc argument, now it executes just in main load scope context.
|
618
|
-
|
619
460
|
`CitiesIndex.all.load(scope: {city: City.include(:country)})`
|
620
461
|
`CitiesIndex.all.load(scope: {city: -> { include(:country) }})`
|
621
462
|
`CitiesIndex.all.load(scope: ->{ include(:country) })`
|
@@ -623,35 +464,19 @@
|
|
623
464
|
# Version 0.1.0
|
624
465
|
|
625
466
|
* Added filters simplified DSL. See [filters.rb](lib/chewy/query/filters.rb) for more details.
|
626
|
-
|
627
467
|
* Queries and filters join system reworked. See [query.rb](lib/chewy/query.rb) for more details.
|
628
|
-
|
629
468
|
* Added query `merge` method
|
630
|
-
|
631
|
-
* `update_index` matcher now wraps expected block in `Chewy.atomic` by default.
|
632
|
-
This behaviour can be prevented with `atomic: false` option passing
|
633
|
-
|
469
|
+
* `update_index` matcher now wraps expected block in `Chewy.atomic` by default. This behaviour can be prevented with `atomic: false` option passing
|
634
470
|
```ruby
|
635
471
|
expect { user.save! }.to update_index('users#user', atomic: false)
|
636
472
|
```
|
637
|
-
|
638
473
|
* Renamed `Chewy.observing_enabled` to `Chewy.urgent_update` with `false` as default
|
639
|
-
|
640
|
-
*
|
641
|
-
|
642
|
-
|
643
|
-
* Added import ActiveSupport::Notifications instrumentation
|
644
|
-
`ActiveSupport::Notifications.subscribe('import_objects.chewy') { |*args| }`
|
645
|
-
|
646
|
-
* Added `types!` and `only!` query chain methods, which purges previously
|
647
|
-
chained types and fields
|
648
|
-
|
474
|
+
* `update_elasticsearch` renamed to `update_index`, added `update_index` `:urgent` option
|
475
|
+
* Added import ActiveSupport::Notifications instrumentation `ActiveSupport::Notifications.subscribe('import_objects.chewy') { |*args| }`
|
476
|
+
* Added `types!` and `only!` query chain methods, which purges previously chained types and fields
|
649
477
|
* `types` chain method now uses types filter
|
650
|
-
|
651
478
|
* Added `types` query chain method
|
652
|
-
|
653
479
|
* Changed types access API:
|
654
|
-
|
655
480
|
```ruby
|
656
481
|
UsersIndex::User # => UsersIndex::User
|
657
482
|
UsersIndex::types_hash['user'] # => UsersIndex::User
|
@@ -659,37 +484,105 @@
|
|
659
484
|
UsersIndex.types # => [UsersIndex::User]
|
660
485
|
UsersIndex.type_names # => ['user']
|
661
486
|
```
|
662
|
-
|
663
487
|
* `update_elasticsearch` method name as the second argument
|
664
488
|
|
665
489
|
```ruby
|
666
490
|
update_elasticsearch('users#user', :self)
|
667
491
|
update_elasticsearch('users#user', :users)
|
668
492
|
```
|
669
|
-
|
670
|
-
*
|
671
|
-
`UsersIndex.index_create`, became `UsersIndex.create`
|
672
|
-
|
673
|
-
* Ability to pass value proc for source object context if arity == 0
|
674
|
-
`field :full_name, value: ->{ first_name + last_name }` instead of
|
675
|
-
`field :full_name, value: ->(u){ u.first_name + u.last_name }`
|
676
|
-
|
493
|
+
* Changed index handle methods, removed `index_` prefix. I.e. was `UsersIndex.index_create`, became `UsersIndex.create`
|
494
|
+
* Ability to pass value proc for source object context if arity == 0 `field :full_name, value: ->{ first_name + last_name }` instead of `field :full_name, value: ->(u){ u.first_name + u.last_name }`
|
677
495
|
* Added `.only` chain to `update_index` matcher
|
678
|
-
|
679
|
-
* Added ability to pass ActiveRecord::Relation as a scope for load
|
680
|
-
`CitiesIndex.all.load(scope: {city: City.include(:country)})`
|
681
|
-
|
496
|
+
* Added ability to pass ActiveRecord::Relation as a scope for load `CitiesIndex.all.load(scope: {city: City.include(:country)})`
|
682
497
|
* Added method `all` to index for query DSL consistency
|
683
|
-
|
684
498
|
* Implemented isolated adapters to simplify adding new ORMs
|
685
|
-
|
686
|
-
* Query DLS chainable methods delegated to index class
|
687
|
-
(no longer need to call MyIndex.search.query, just MyIndex.query)
|
499
|
+
* Query DLS chainable methods delegated to index class (no longer need to call MyIndex.search.query, just MyIndex.query)
|
688
500
|
|
689
501
|
# Version 0.0.1
|
690
502
|
|
691
503
|
* Query DSL
|
692
|
-
|
693
504
|
* Basic index handling
|
694
|
-
|
695
505
|
* Initial version
|
506
|
+
|
507
|
+
[@0x0badc0de]: https://github.com/0x0badc0de
|
508
|
+
[@aglushkov]: https://github.com/aglushkov
|
509
|
+
[@AlexVPopov]: https://github.com/AlexVPopov
|
510
|
+
[@AndreySavelyev]: https://github.com/AndreySavelyev
|
511
|
+
[@arion]: https://github.com/arion
|
512
|
+
[@arturtr]: https://github.com/arturtr
|
513
|
+
[@averell23]: https://github.com/averell23
|
514
|
+
[@baronworks]: https://github.com/baronworks
|
515
|
+
[@barthez]: https://github.com/barthez
|
516
|
+
[@bbatsov]: https://github.com/bbatsov
|
517
|
+
[@bhacaz]: https://github.com/bhacaz
|
518
|
+
[@biow0lf]: https://github.com/biow0lf
|
519
|
+
[@Borzik]: https://github.com/Borzik
|
520
|
+
[@caldwecr]: https://github.com/caldwecr
|
521
|
+
[@clupprich]: https://github.com/clupprich
|
522
|
+
[@dalthon]: https://github.com/dalthon
|
523
|
+
[@davekaro]: https://github.com/davekaro
|
524
|
+
[@dck]: https://github.com/dck
|
525
|
+
[@dm1try]: https://github.com/dm1try
|
526
|
+
[@dmitry]: https://github.com/dmitry
|
527
|
+
[@dnd]: https://github.com/dnd
|
528
|
+
[@DNNX]: https://github.com/DNNX
|
529
|
+
[@eManPrague]: https://github.com/eManPrague
|
530
|
+
[@eproulx-petalmd]: https://github.com/eproulx-petalmd
|
531
|
+
[@fabiotomio]: https://github.com/fabiotomio
|
532
|
+
[@feymartynov]: https://github.com/feymartynov
|
533
|
+
[@gseddon]: https://github.com/gseddon
|
534
|
+
[@guigs]: https://github.com/guigs
|
535
|
+
[@heartfulbird]: https://github.com/heartfulbird
|
536
|
+
[@henrebotha]: https://github.com/henrebotha
|
537
|
+
[@inbeom]: https://github.com/inbeom
|
538
|
+
[@jesjos]: https://github.com/jesjos
|
539
|
+
[@JF-Lalonde]: https://github.com/JF-Lalonde
|
540
|
+
[@jimmybaker]: https://github.com/jimmybaker
|
541
|
+
[@jirikolarik]: https://github.com/jirikolarik
|
542
|
+
[@jirutka]: https://github.com/jirutka
|
543
|
+
[@joeljunstrom]: https://github.com/joeljunstrom
|
544
|
+
[@jondavidford]: https://github.com/jondavidford
|
545
|
+
[@joonty]: https://github.com/joonty
|
546
|
+
[@josecoelho]: https://github.com/josecoelho
|
547
|
+
[@josephchoe]: https://github.com/josephchoe
|
548
|
+
[@jshirley]: https://github.com/jshirley
|
549
|
+
[@ka8725]: https://github.com/ka8725
|
550
|
+
[@konalegi]: https://github.com/konalegi
|
551
|
+
[@lardawge]: https://github.com/lardawge
|
552
|
+
[@leemhenson]: https://github.com/leemhenson
|
553
|
+
[@Linuus]: https://github.com/Linuus
|
554
|
+
[@lowang]: https://github.com/lowang
|
555
|
+
[@mainameiz]: https://github.com/mainameiz
|
556
|
+
[@MarkMurphy]: https://github.com/MarkMurphy
|
557
|
+
[@marshall]: https://github.com/marshall
|
558
|
+
[@matchbookmac]: https://github.com/matchbookmac
|
559
|
+
[@matthee]: https://github.com/matthee
|
560
|
+
[@mattzollinhofer]: https://github.com/mattzollinhofer
|
561
|
+
[@menglewis]: https://github.com/menglewis
|
562
|
+
[@mikeyhogarth]: https://github.com/mikeyhogarth
|
563
|
+
[@mkcode]: https://github.com/mkcode
|
564
|
+
[@mpeychich]: https://github.com/mpeychich
|
565
|
+
[@mrbrdo]: https://github.com/mrbrdo
|
566
|
+
[@mrzasa]: https://github.com/mrzasa
|
567
|
+
[@musaffa]: https://github.com/musaffa
|
568
|
+
[@nattfodd]: https://github.com/nattfodd
|
569
|
+
[@okliv]: https://github.com/okliv
|
570
|
+
[@olancheg]: https://github.com/olancheg
|
571
|
+
[@parallel588]: https://github.com/parallel588
|
572
|
+
[@pyromaniac]: https://github.com/pyromaniac
|
573
|
+
[@rabotyaga]: https://github.com/rabotyaga
|
574
|
+
[@reidab]: https://github.com/reidab
|
575
|
+
[@robacarp]: https://github.com/robacarp
|
576
|
+
[@robertasg]: https://github.com/robertasg
|
577
|
+
[@rschellhorn]: https://github.com/rschellhorn
|
578
|
+
[@sergey-kintsel]: https://github.com/sergey-kintsel
|
579
|
+
[@sergeygaychuk]: https://github.com/sergeygaychuk
|
580
|
+
[@SeTeM]: https://github.com/SeTeM
|
581
|
+
[@sevab]: https://github.com/sevab
|
582
|
+
[@sharkzp]: https://github.com/sharkzp
|
583
|
+
[@socialchorus]: https://github.com/socialchorus
|
584
|
+
[@taylor-au]: https://github.com/taylor-au
|
585
|
+
[@TikiTDO]: https://github.com/TikiTDO
|
586
|
+
[@undr]: https://github.com/undr
|
587
|
+
[@webgago]: https://github.com/webgago
|
588
|
+
[@yahooguntu]: https://github.com/yahooguntu
|