chewy 7.2.1 → 7.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/CODEOWNERS +1 -0
- data/.github/dependabot.yml +42 -0
- data/.github/workflows/ruby.yml +28 -26
- data/.rubocop.yml +4 -1
- data/CHANGELOG.md +196 -0
- data/Gemfile +4 -3
- data/README.md +203 -20
- data/chewy.gemspec +4 -18
- data/gemfiles/base.gemfile +12 -0
- data/gemfiles/rails.6.1.activerecord.gemfile +2 -1
- data/gemfiles/{rails.5.2.activerecord.gemfile → rails.7.0.activerecord.gemfile} +6 -3
- data/gemfiles/{rails.6.0.activerecord.gemfile → rails.7.1.activerecord.gemfile} +6 -3
- data/lib/chewy/config.rb +22 -14
- data/lib/chewy/elastic_client.rb +31 -0
- data/lib/chewy/errors.rb +11 -2
- data/lib/chewy/fields/base.rb +69 -13
- data/lib/chewy/fields/root.rb +2 -10
- data/lib/chewy/index/actions.rb +11 -16
- data/lib/chewy/index/adapter/active_record.rb +18 -3
- data/lib/chewy/index/adapter/object.rb +0 -10
- data/lib/chewy/index/adapter/orm.rb +4 -14
- data/lib/chewy/index/crutch.rb +15 -7
- data/lib/chewy/index/import/bulk_builder.rb +219 -32
- data/lib/chewy/index/import/bulk_request.rb +1 -1
- data/lib/chewy/index/import/routine.rb +3 -3
- data/lib/chewy/index/import.rb +45 -31
- data/lib/chewy/index/mapping.rb +2 -2
- data/lib/chewy/index/observe/active_record_methods.rb +87 -0
- data/lib/chewy/index/observe/callback.rb +34 -0
- data/lib/chewy/index/observe.rb +3 -58
- data/lib/chewy/index/syncer.rb +1 -1
- data/lib/chewy/index.rb +25 -0
- data/lib/chewy/journal.rb +17 -6
- data/lib/chewy/log_subscriber.rb +5 -1
- data/lib/chewy/minitest/helpers.rb +77 -0
- data/lib/chewy/minitest/search_index_receiver.rb +3 -1
- data/lib/chewy/rake_helper.rb +92 -11
- data/lib/chewy/rspec/build_query.rb +12 -0
- data/lib/chewy/rspec/helpers.rb +55 -0
- data/lib/chewy/rspec/update_index.rb +14 -7
- data/lib/chewy/rspec.rb +2 -0
- data/lib/chewy/runtime/version.rb +1 -1
- data/lib/chewy/runtime.rb +1 -1
- data/lib/chewy/search/parameters/collapse.rb +16 -0
- data/lib/chewy/search/parameters/ignore_unavailable.rb +27 -0
- data/lib/chewy/search/parameters/indices.rb +1 -1
- data/lib/chewy/search/parameters/knn.rb +16 -0
- data/lib/chewy/search/parameters/order.rb +6 -19
- data/lib/chewy/search/parameters/storage.rb +1 -1
- data/lib/chewy/search/parameters/track_total_hits.rb +16 -0
- data/lib/chewy/search/parameters.rb +4 -4
- data/lib/chewy/search/request.rb +74 -16
- data/lib/chewy/search/scoping.rb +1 -1
- data/lib/chewy/search.rb +5 -2
- data/lib/chewy/stash.rb +3 -3
- data/lib/chewy/strategy/active_job.rb +1 -1
- data/lib/chewy/strategy/atomic_no_refresh.rb +18 -0
- data/lib/chewy/strategy/base.rb +10 -0
- data/lib/chewy/strategy/delayed_sidekiq/scheduler.rb +168 -0
- data/lib/chewy/strategy/delayed_sidekiq/worker.rb +76 -0
- data/lib/chewy/strategy/delayed_sidekiq.rb +30 -0
- data/lib/chewy/strategy/lazy_sidekiq.rb +64 -0
- data/lib/chewy/strategy/sidekiq.rb +1 -1
- data/lib/chewy/strategy.rb +3 -0
- data/lib/chewy/version.rb +1 -1
- data/lib/chewy.rb +21 -14
- data/lib/tasks/chewy.rake +18 -2
- data/migration_guide.md +1 -1
- data/spec/chewy/config_spec.rb +2 -2
- data/spec/chewy/elastic_client_spec.rb +26 -0
- data/spec/chewy/fields/base_spec.rb +39 -18
- data/spec/chewy/index/actions_spec.rb +10 -10
- data/spec/chewy/index/adapter/active_record_spec.rb +88 -0
- data/spec/chewy/index/import/bulk_builder_spec.rb +309 -1
- data/spec/chewy/index/import/routine_spec.rb +5 -5
- data/spec/chewy/index/import_spec.rb +48 -26
- data/spec/chewy/index/observe/active_record_methods_spec.rb +68 -0
- data/spec/chewy/index/observe/callback_spec.rb +139 -0
- data/spec/chewy/index/observe_spec.rb +27 -0
- data/spec/chewy/journal_spec.rb +13 -49
- data/spec/chewy/minitest/helpers_spec.rb +111 -1
- data/spec/chewy/minitest/search_index_receiver_spec.rb +6 -4
- data/spec/chewy/rake_helper_spec.rb +170 -0
- data/spec/chewy/rspec/build_query_spec.rb +34 -0
- data/spec/chewy/rspec/helpers_spec.rb +61 -0
- data/spec/chewy/search/pagination/kaminari_examples.rb +1 -1
- data/spec/chewy/search/pagination/kaminari_spec.rb +1 -1
- data/spec/chewy/search/parameters/collapse_spec.rb +5 -0
- data/spec/chewy/search/parameters/ignore_unavailable_spec.rb +67 -0
- data/spec/chewy/search/parameters/knn_spec.rb +5 -0
- data/spec/chewy/search/parameters/order_spec.rb +18 -11
- data/spec/chewy/search/parameters/track_total_hits_spec.rb +5 -0
- data/spec/chewy/search/parameters_spec.rb +6 -1
- data/spec/chewy/search/request_spec.rb +58 -9
- data/spec/chewy/search_spec.rb +9 -0
- data/spec/chewy/strategy/active_job_spec.rb +8 -8
- data/spec/chewy/strategy/atomic_no_refresh_spec.rb +60 -0
- data/spec/chewy/strategy/delayed_sidekiq_spec.rb +208 -0
- data/spec/chewy/strategy/lazy_sidekiq_spec.rb +214 -0
- data/spec/chewy/strategy/sidekiq_spec.rb +4 -4
- data/spec/chewy_spec.rb +10 -7
- data/spec/spec_helper.rb +1 -2
- data/spec/support/active_record.rb +8 -1
- metadata +45 -264
- data/lib/chewy/backports/deep_dup.rb +0 -46
- data/lib/chewy/backports/duplicable.rb +0 -91
- data/lib/chewy/index/import/thread_safe_progress_bar.rb +0 -40
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a15165f889275fecc6a0d590c3339ce0ac9b7944f916306fd6883e7c2be67747
|
|
4
|
+
data.tar.gz: 8efc6201add68bf1c378f598934b6c52c74bd9a62056e7aafdd357358d5cd2b0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cfc7f1297fc72fcbdfdbedbcd82c6afe12dd9e15583b4e3467a8a77da89cd1aa8f20b9d0c0a8dd1841275e2916715030e28e9ed10cf510d6985904be9574890e
|
|
7
|
+
data.tar.gz: 6917027945ce94dab50d2f6d679570be58e4bb86472f1d591805d915ca425ecbd24e4cc13e30a459fe2dae4d572002735b69cef138a5c6038c52803a251b8a54
|
data/.github/CODEOWNERS
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.github/workflows @toptal/platform-sre
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
registries:
|
|
3
|
+
toptal-github:
|
|
4
|
+
type: "git"
|
|
5
|
+
url: "https://github.com"
|
|
6
|
+
username: "x-access-token"
|
|
7
|
+
password: "${{secrets.DEPENDABOT_GITHUB_TOKEN}}"
|
|
8
|
+
|
|
9
|
+
updates:
|
|
10
|
+
- package-ecosystem: bundler
|
|
11
|
+
directory: "/"
|
|
12
|
+
schedule:
|
|
13
|
+
interval: "weekly"
|
|
14
|
+
day: "wednesday"
|
|
15
|
+
time: "07:00"
|
|
16
|
+
pull-request-branch-name:
|
|
17
|
+
separator: "-"
|
|
18
|
+
labels:
|
|
19
|
+
- "no-jira"
|
|
20
|
+
- "ruby"
|
|
21
|
+
- "dependencies"
|
|
22
|
+
reviewers:
|
|
23
|
+
- "toptal/devx"
|
|
24
|
+
registries:
|
|
25
|
+
- toptal-github
|
|
26
|
+
insecure-external-code-execution: allow
|
|
27
|
+
open-pull-requests-limit: 3
|
|
28
|
+
- package-ecosystem: "github-actions"
|
|
29
|
+
directory: "/"
|
|
30
|
+
schedule:
|
|
31
|
+
interval: "weekly"
|
|
32
|
+
day: "wednesday"
|
|
33
|
+
time: "07:00"
|
|
34
|
+
pull-request-branch-name:
|
|
35
|
+
separator: "-"
|
|
36
|
+
labels:
|
|
37
|
+
- "no-jira"
|
|
38
|
+
- "dependencies"
|
|
39
|
+
- "gha"
|
|
40
|
+
reviewers:
|
|
41
|
+
- "toptal/devx"
|
|
42
|
+
open-pull-requests-limit: 3
|
data/.github/workflows/ruby.yml
CHANGED
|
@@ -1,46 +1,48 @@
|
|
|
1
1
|
name: CI
|
|
2
2
|
|
|
3
|
-
on:
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [master]
|
|
6
|
+
pull_request:
|
|
7
|
+
types: [
|
|
8
|
+
synchronize, # PR was updated
|
|
9
|
+
opened, # PR was open
|
|
10
|
+
reopened # PR was reopened
|
|
11
|
+
]
|
|
4
12
|
|
|
5
13
|
jobs:
|
|
6
|
-
|
|
14
|
+
ruby-3:
|
|
7
15
|
runs-on: ubuntu-latest
|
|
8
16
|
strategy:
|
|
9
17
|
fail-fast: false
|
|
10
18
|
matrix:
|
|
11
|
-
ruby: [
|
|
12
|
-
gemfile: [rails.
|
|
19
|
+
ruby: [ '3.0', '3.1', '3.2' ]
|
|
20
|
+
gemfile: [rails.6.1.activerecord, rails.7.0.activerecord, rails.7.1.activerecord]
|
|
13
21
|
name: ${{ matrix.ruby }}-${{ matrix.gemfile }}
|
|
14
22
|
|
|
15
23
|
env:
|
|
16
24
|
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
|
|
17
25
|
|
|
26
|
+
services:
|
|
27
|
+
redis:
|
|
28
|
+
# Docker Hub image
|
|
29
|
+
image: redis
|
|
30
|
+
ports:
|
|
31
|
+
- '6379:6379'
|
|
32
|
+
# Set health checks to wait until redis has started
|
|
33
|
+
options: >-
|
|
34
|
+
--health-cmd "redis-cli ping"
|
|
35
|
+
--health-interval 10s
|
|
36
|
+
--health-timeout 5s
|
|
37
|
+
--health-retries 5
|
|
18
38
|
steps:
|
|
19
|
-
- uses: actions/checkout@
|
|
39
|
+
- uses: actions/checkout@v4
|
|
20
40
|
- uses: ruby/setup-ruby@v1
|
|
21
41
|
with:
|
|
22
42
|
ruby-version: ${{ matrix.ruby }}
|
|
23
43
|
bundler-cache: true
|
|
24
44
|
- name: Run Elasticsearch
|
|
25
|
-
uses: elastic/elastic-github-actions/elasticsearch@
|
|
26
|
-
with:
|
|
27
|
-
stack-version: 7.10.1
|
|
28
|
-
port: 9250
|
|
29
|
-
- name: Tests
|
|
30
|
-
run: bundle exec rspec
|
|
31
|
-
|
|
32
|
-
ruby-3-0-activerecord-6-1:
|
|
33
|
-
runs-on: ubuntu-latest
|
|
34
|
-
env:
|
|
35
|
-
BUNDLE_GEMFILE: gemfiles/rails.6.1.activerecord.gemfile
|
|
36
|
-
steps:
|
|
37
|
-
- uses: actions/checkout@v2
|
|
38
|
-
- uses: ruby/setup-ruby@v1
|
|
39
|
-
with:
|
|
40
|
-
ruby-version: '3.0'
|
|
41
|
-
bundler-cache: true
|
|
42
|
-
- name: Run Elasticsearch
|
|
43
|
-
uses: elastic/elastic-github-actions/elasticsearch@master
|
|
45
|
+
uses: elastic/elastic-github-actions/elasticsearch@9de0f78f306e4ebc0838f057e6b754364685e759
|
|
44
46
|
with:
|
|
45
47
|
stack-version: 7.10.1
|
|
46
48
|
port: 9250
|
|
@@ -50,9 +52,9 @@ jobs:
|
|
|
50
52
|
rubocop:
|
|
51
53
|
runs-on: ubuntu-latest
|
|
52
54
|
steps:
|
|
53
|
-
- uses: actions/checkout@
|
|
55
|
+
- uses: actions/checkout@v4
|
|
54
56
|
- uses: ruby/setup-ruby@v1
|
|
55
57
|
with:
|
|
56
|
-
ruby-version:
|
|
58
|
+
ruby-version: 3.0
|
|
57
59
|
bundler-cache: true
|
|
58
60
|
- run: bundle exec rubocop --format simple
|
data/.rubocop.yml
CHANGED
|
@@ -2,7 +2,7 @@ inherit_from: .rubocop_todo.yml
|
|
|
2
2
|
|
|
3
3
|
AllCops:
|
|
4
4
|
NewCops: enable
|
|
5
|
-
TargetRubyVersion:
|
|
5
|
+
TargetRubyVersion: 3.0
|
|
6
6
|
|
|
7
7
|
Layout/AccessModifierIndentation:
|
|
8
8
|
EnforcedStyle: outdent
|
|
@@ -59,3 +59,6 @@ Metrics/ModuleLength:
|
|
|
59
59
|
Exclude:
|
|
60
60
|
- 'lib/chewy/rake_helper.rb'
|
|
61
61
|
- '**/*_spec.rb'
|
|
62
|
+
|
|
63
|
+
Style/ArgumentsForwarding:
|
|
64
|
+
Enabled: false
|
data/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,195 @@
|
|
|
8
8
|
|
|
9
9
|
### Bugs Fixed
|
|
10
10
|
|
|
11
|
+
## 7.6.0 (2024-05-03)
|
|
12
|
+
|
|
13
|
+
### Changes
|
|
14
|
+
|
|
15
|
+
* [#933](https://github.com/toptal/chewy/pull/933): Relax allowed `elasticsearch` dependency versions. ([@mjankowski][])
|
|
16
|
+
|
|
17
|
+
### Bugs Fixed
|
|
18
|
+
* [#937](https://github.com/toptal/chewy/pull/937): Fix for race condition while using the `delayed_sidekiq` strategy. Also, fix for Redis bloating in case of reindexing error ([@skcc321](https://github.com/skcc321))
|
|
19
|
+
|
|
20
|
+
* [#947](https://github.com/toptal/chewy/pull/947): Fix intermittent time-based failure in delayed sidekiq spec. ([@mjankowski][])
|
|
21
|
+
|
|
22
|
+
## 7.5.1 (2024-01-30)
|
|
23
|
+
|
|
24
|
+
### New Features
|
|
25
|
+
|
|
26
|
+
* [#925](https://github.com/toptal/chewy/pull/925): Add configuration option for default scope cleanup behavior. ([@barthez][])
|
|
27
|
+
|
|
28
|
+
### Changes
|
|
29
|
+
|
|
30
|
+
### Bugs Fixed
|
|
31
|
+
|
|
32
|
+
## 7.5.0 (2024-01-15)
|
|
33
|
+
|
|
34
|
+
### New Features
|
|
35
|
+
|
|
36
|
+
* [#894](https://github.com/toptal/chewy/pull/894): Way of cleaning redis from artifacts left by `delayed_sidekiq` strategy which could potentially cause flaky tests. ([@Drowze](https://github.com/Drowze))
|
|
37
|
+
* [#919](https://github.com/toptal/chewy/pull/919): Add pre-request filter ([@konalegi][https://github.com/konalegi])
|
|
38
|
+
|
|
39
|
+
## 7.4.0 (2023-12-13)
|
|
40
|
+
|
|
41
|
+
### New Features
|
|
42
|
+
|
|
43
|
+
### Changes
|
|
44
|
+
|
|
45
|
+
* [#911](https://github.com/toptal/chewy/pull/911): Remove ruby 2.x. ([@konalegi][https://github.com/konalegi])
|
|
46
|
+
|
|
47
|
+
### Bugs Fixed
|
|
48
|
+
|
|
49
|
+
## 7.3.6 (2023-12-13)
|
|
50
|
+
|
|
51
|
+
### New Features
|
|
52
|
+
|
|
53
|
+
* [#890](https://github.com/toptal/chewy/pull/890): Add the [`knn`](https://www.elastic.co/guide/en/elasticsearch/reference/current/knn-search.html) option to the request. ([@jkostolansky][])
|
|
54
|
+
|
|
55
|
+
### Changes
|
|
56
|
+
|
|
57
|
+
### Bugs Fixed
|
|
58
|
+
|
|
59
|
+
## 7.3.5 (2023-12-06)
|
|
60
|
+
|
|
61
|
+
### New Features
|
|
62
|
+
|
|
63
|
+
* [#907](https://github.com/toptal/chewy/pull/907): Fix deprecation warning in LogSubscriber for Rails 7.1 ([@alejandroperea](https://github.com/alejandroperea))
|
|
64
|
+
|
|
65
|
+
### Changes
|
|
66
|
+
|
|
67
|
+
### Bugs Fixed
|
|
68
|
+
|
|
69
|
+
## 7.3.4 (2023-08-29)
|
|
70
|
+
|
|
71
|
+
### New Features
|
|
72
|
+
|
|
73
|
+
* [#888](https://github.com/toptal/chewy/pull/892): Rake task to create missing indexes ([@konalegi](https://github.com/konalegi))
|
|
74
|
+
|
|
75
|
+
### Changes
|
|
76
|
+
|
|
77
|
+
### Bugs Fixed
|
|
78
|
+
|
|
79
|
+
## 7.3.3 (2023-07-07)
|
|
80
|
+
|
|
81
|
+
### New Features
|
|
82
|
+
|
|
83
|
+
* [#888](https://github.com/toptal/chewy/pull/888/files): Skip journal creation on import ([@konalegi](https://github.com/konalegi))
|
|
84
|
+
|
|
85
|
+
### Changes
|
|
86
|
+
|
|
87
|
+
### Bugs Fixed
|
|
88
|
+
|
|
89
|
+
## 7.3.2 (2023-04-20)
|
|
90
|
+
|
|
91
|
+
### New Features
|
|
92
|
+
|
|
93
|
+
### Changes
|
|
94
|
+
|
|
95
|
+
### Bugs Fixed
|
|
96
|
+
|
|
97
|
+
* [#861](https://github.com/toptal/chewy/pull/861): Fix bug in mock_elasticsearch_response_sources ([@lafeber](https://github.com/lafeber))
|
|
98
|
+
|
|
99
|
+
## 7.3.1 (2023-04-20)
|
|
100
|
+
|
|
101
|
+
### Bugs Fixed
|
|
102
|
+
|
|
103
|
+
* [#874](https://github.com/toptal/chewy/pull/874): Fix `chewy:journal:clean` task for ruby 3.x. ([@muk-ai](https://github.com/muk-ai))
|
|
104
|
+
* [#882](https://github.com/toptal/chewy/pull/882): Fix memory leak during `chewy:reset` for ruby 3.2 ([@konalegi](https://github.com/konalegi))
|
|
105
|
+
|
|
106
|
+
## 7.3.0 (2023-04-03)
|
|
107
|
+
|
|
108
|
+
### New Features
|
|
109
|
+
|
|
110
|
+
* [#869](https://github.com/toptal/chewy/pull/869): New strategy - `delayed_sidekiq`. Allow passing `strategy: :delayed_sidekiq` option to `SomeIndex.import([1, ...], strategy: :delayed_sidekiq)`. The strategy is compatible with `update_fields` option as well. ([@skcc321][])
|
|
111
|
+
* [#879](https://github.com/toptal/chewy/pull/879): Configure CI to check for ruby 3.2 compatibility. ([@konalegi][])
|
|
112
|
+
|
|
113
|
+
### Changes
|
|
114
|
+
|
|
115
|
+
### Bugs Fixed
|
|
116
|
+
|
|
117
|
+
* [#856](https://github.com/toptal/chewy/pull/856): Fix return value of subscribed_task_stats used in rake tasks. ([@fabiormoura][])
|
|
118
|
+
|
|
119
|
+
## 7.2.7 (2022-11-15)
|
|
120
|
+
|
|
121
|
+
### New Features
|
|
122
|
+
|
|
123
|
+
* [#857](https://github.com/toptal/chewy/pull/857): Allow passing `wait_for_completion`, `request_per_second` and `scroll_size` options to `chewy:journal:clean` rake task and `delete_all` query builder method. ([@konalegi][])([@barthez][])
|
|
124
|
+
|
|
125
|
+
### Changes
|
|
126
|
+
|
|
127
|
+
### Bugs Fixed
|
|
128
|
+
|
|
129
|
+
* [#863](https://github.com/toptal/chewy/pull/863): Fix `crutches` call doesn't respect `update_fields` option. ([@skcc321][])
|
|
130
|
+
|
|
131
|
+
## 7.2.6 (2022-06-13)
|
|
132
|
+
|
|
133
|
+
### New Features
|
|
134
|
+
|
|
135
|
+
* [#841](https://github.com/toptal/chewy/pull/841): Add the [`collapse`](https://www.elastic.co/guide/en/elasticsearch/reference/current/collapse-search-results.html) option to the request. ([@jkostolansky][])
|
|
136
|
+
|
|
137
|
+
### Bugs Fixed
|
|
138
|
+
|
|
139
|
+
* [#842](https://github.com/toptal/chewy/issues/842): Fix `ignore_blank` handling. ([@rabotyaga][])
|
|
140
|
+
* [#848](https://github.com/toptal/chewy/issues/848): Fix invalid journal pagination. ([@konalegi][])
|
|
141
|
+
|
|
142
|
+
## 7.2.5 (2022-03-04)
|
|
143
|
+
|
|
144
|
+
### New Features
|
|
145
|
+
|
|
146
|
+
* [#827](https://github.com/toptal/chewy/pull/827): Add `:lazy_sidekiq` strategy, that defers not only importing but also `update_index` callback evaluation for created and updated objects. ([@sl4vr][])
|
|
147
|
+
* [#827](https://github.com/toptal/chewy/pull/827): Add `:atomic_no_refresh` strategy. Like `:atomic`, but `refresh=false` parameter is set. ([@barthez][])
|
|
148
|
+
* [#827](https://github.com/toptal/chewy/pull/827): Add `:no_refresh` chain call to `update_index` matcher to ensure import was called with `refresh=false`. ([@barthez][])
|
|
149
|
+
|
|
150
|
+
### Bugs Fixed
|
|
151
|
+
|
|
152
|
+
* [#835](https://github.com/toptal/chewy/pull/835): Support keyword arguments in named scopes. ([@milk1000cc][])
|
|
153
|
+
|
|
154
|
+
## 7.2.4 (2022-02-03)
|
|
155
|
+
|
|
156
|
+
### New Features
|
|
157
|
+
|
|
158
|
+
* [#760](https://github.com/toptal/chewy/pull/760): Replace parent-child mapping with a [join field](https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html#parent-child-mapping-types) ([@mrzasa][])
|
|
159
|
+
|
|
160
|
+
### Bugs Fixed
|
|
161
|
+
|
|
162
|
+
* [#825](https://github.com/toptal/chewy/issues/825): Fix mismatch argument names at update_mapping rake task ([@AgeevAndrew][])
|
|
163
|
+
* [#832](https://github.com/toptal/chewy/issues/832): Fix "cannot load such file -- `i18n/core_ext/hash`" ([@chrisandreae][])
|
|
164
|
+
|
|
165
|
+
## 7.2.3 (2021-10-29)
|
|
166
|
+
|
|
167
|
+
### New Features
|
|
168
|
+
|
|
169
|
+
* [#801](https://github.com/toptal/chewy/pull/801): Add the [`track_total_hits`](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-your-data.html#track-total-hits) option to the query. ([@milk1000cc][])
|
|
170
|
+
* [#810](https://github.com/toptal/chewy/pull/810): Use `unsafe_load` when loading config to support Psych 4.
|
|
171
|
+
* [#819](https://github.com/toptal/chewy/pull/819): Add the [`ignore_unavailable`](https://www.elastic.co/guide/en/elasticsearch/reference/current/multi-index.html#multi-index) option to the request. ([@kolauren][])
|
|
172
|
+
|
|
173
|
+
### Changes
|
|
174
|
+
|
|
175
|
+
* [#817](https://github.com/toptal/chewy/pull/817): Show warning message during rake chewy:reset or chewy:upgrade if journaling is disabled. ([@konalegi][])
|
|
176
|
+
|
|
177
|
+
### Bugs Fixed
|
|
178
|
+
|
|
179
|
+
* [#816](https://github.com/toptal/chewy/pull/816): Move query [`preference`](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/search-search.html#search-preference) from body to query parameters. ([@afg419][])
|
|
180
|
+
|
|
181
|
+
## 7.2.2 (2021-05-24)
|
|
182
|
+
|
|
183
|
+
### Changes
|
|
184
|
+
|
|
185
|
+
* [#800](https://github.com/toptal/chewy/pull/800): Revert [#787](https://github.com/toptal/chewy/pull/787) progressbar feature to avoid performance degradation in parallel import ([@rabotyaga][])
|
|
186
|
+
|
|
187
|
+
* [#795](https://github.com/toptal/chewy/issues/795): **(Breaking)** Change the Chewy::Search::Parameters::Order implementation to use Array ([@jiajiawang][]):
|
|
188
|
+
* To allow multiple sorting options that may have the same key name. For example script based sorting whose key will always be `_script`.
|
|
189
|
+
* Behaviour change of chained `order` calls.
|
|
190
|
+
* e.g. `.order(_script: {a: 1}).order(_script: {b: 2})`
|
|
191
|
+
* Before `{:sort=>[{"_script"=>{:b=>2}}]}`
|
|
192
|
+
* After `{:sort=>[{"_script"=>{:a=>1}},{"_script"=>{:b=>2}}]}`
|
|
193
|
+
|
|
194
|
+
* [#654](https://github.com/toptal/chewy/issues/654): Add helpers and matchers for testing ([@Vitalina-Vakulchyk][]):
|
|
195
|
+
* `mock_elasticsearch_response` helpers both Rspec and Minitest - to mock elasticsearch response
|
|
196
|
+
* `mock_elasticsearch_response_sources` helpers both Rspec and Minitest - to mock elasticsearch response sources
|
|
197
|
+
* `assert_elasticsearch_query` helper for Minitest - to compare request and expected query (returns `true`/`false`)
|
|
198
|
+
* `build_query` matcher for Rspec - to compare request and expected query (returns `true`/`false`)
|
|
199
|
+
|
|
11
200
|
## 7.2.1 (2021-05-11)
|
|
12
201
|
|
|
13
202
|
### New Features
|
|
@@ -599,9 +788,11 @@
|
|
|
599
788
|
* Initial version
|
|
600
789
|
|
|
601
790
|
[@0x0badc0de]: https://github.com/0x0badc0de
|
|
791
|
+
[@AgeevAndrew]: https://github.com/AgeevAndrew
|
|
602
792
|
[@aglushkov]: https://github.com/aglushkov
|
|
603
793
|
[@AlexVPopov]: https://github.com/AlexVPopov
|
|
604
794
|
[@AndreySavelyev]: https://github.com/AndreySavelyev
|
|
795
|
+
[@afg419]: https://github.com/afg419
|
|
605
796
|
[@arion]: https://github.com/arion
|
|
606
797
|
[@arturtr]: https://github.com/arturtr
|
|
607
798
|
[@averell23]: https://github.com/averell23
|
|
@@ -612,6 +803,7 @@
|
|
|
612
803
|
[@biow0lf]: https://github.com/biow0lf
|
|
613
804
|
[@Borzik]: https://github.com/Borzik
|
|
614
805
|
[@caldwecr]: https://github.com/caldwecr
|
|
806
|
+
[@chrisandreae]: https://github.com/chrisandreae
|
|
615
807
|
[@clupprich]: https://github.com/clupprich
|
|
616
808
|
[@dalthon]: https://github.com/dalthon
|
|
617
809
|
[@davekaro]: https://github.com/davekaro
|
|
@@ -631,9 +823,11 @@
|
|
|
631
823
|
[@inbeom]: https://github.com/inbeom
|
|
632
824
|
[@jesjos]: https://github.com/jesjos
|
|
633
825
|
[@JF-Lalonde]: https://github.com/JF-Lalonde
|
|
826
|
+
[@jiajiawang]: https://github.com/jiajiawang
|
|
634
827
|
[@jimmybaker]: https://github.com/jimmybaker
|
|
635
828
|
[@jirikolarik]: https://github.com/jirikolarik
|
|
636
829
|
[@jirutka]: https://github.com/jirutka
|
|
830
|
+
[@jkostolansky]: https://github.com/jkostolansky
|
|
637
831
|
[@joeljunstrom]: https://github.com/joeljunstrom
|
|
638
832
|
[@jondavidford]: https://github.com/jondavidford
|
|
639
833
|
[@joonty]: https://github.com/joonty
|
|
@@ -641,6 +835,7 @@
|
|
|
641
835
|
[@josephchoe]: https://github.com/josephchoe
|
|
642
836
|
[@jshirley]: https://github.com/jshirley
|
|
643
837
|
[@ka8725]: https://github.com/ka8725
|
|
838
|
+
[@kolauren]: https://github.com/kolauren
|
|
644
839
|
[@konalegi]: https://github.com/konalegi
|
|
645
840
|
[@lardawge]: https://github.com/lardawge
|
|
646
841
|
[@leemhenson]: https://github.com/leemhenson
|
|
@@ -654,6 +849,7 @@
|
|
|
654
849
|
[@mattzollinhofer]: https://github.com/mattzollinhofer
|
|
655
850
|
[@menglewis]: https://github.com/menglewis
|
|
656
851
|
[@mikeyhogarth]: https://github.com/mikeyhogarth
|
|
852
|
+
[@milk1000cc]: https://github.com/milk1000cc
|
|
657
853
|
[@mkcode]: https://github.com/mkcode
|
|
658
854
|
[@mpeychich]: https://github.com/mpeychich
|
|
659
855
|
[@mrbrdo]: https://github.com/mrbrdo
|
data/Gemfile
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
source 'https://rubygems.org'
|
|
2
2
|
|
|
3
|
-
gemspec
|
|
4
|
-
|
|
5
3
|
gem 'activerecord'
|
|
6
4
|
|
|
7
5
|
gem 'activejob', require: false
|
|
@@ -18,4 +16,7 @@ gem 'guard-rspec'
|
|
|
18
16
|
gem 'redcarpet'
|
|
19
17
|
gem 'yard'
|
|
20
18
|
|
|
21
|
-
gem 'rexml'
|
|
19
|
+
gem 'rexml'
|
|
20
|
+
|
|
21
|
+
eval_gemfile 'gemfiles/base.gemfile'
|
|
22
|
+
gemspec
|