chewy 6.0.0 → 7.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE/bug_report.md +39 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +16 -0
- data/.github/workflows/ruby.yml +58 -0
- data/.rubocop.yml +13 -8
- data/.rubocop_todo.yml +110 -22
- data/CHANGELOG.md +200 -105
- data/CODE_OF_CONDUCT.md +14 -0
- data/CONTRIBUTING.md +63 -0
- data/Gemfile +0 -7
- data/Guardfile +3 -1
- data/README.md +313 -274
- data/chewy.gemspec +4 -5
- data/gemfiles/rails.5.2.activerecord.gemfile +8 -14
- data/gemfiles/rails.6.0.activerecord.gemfile +8 -14
- data/gemfiles/rails.6.1.activerecord.gemfile +8 -14
- data/lib/chewy.rb +21 -75
- data/lib/chewy/config.rb +40 -40
- data/lib/chewy/errors.rb +0 -12
- data/lib/chewy/fields/base.rb +11 -1
- data/lib/chewy/fields/root.rb +4 -6
- data/lib/chewy/index.rb +46 -98
- data/lib/chewy/index/actions.rb +65 -43
- data/lib/chewy/{type → index}/adapter/active_record.rb +12 -3
- data/lib/chewy/{type → index}/adapter/base.rb +2 -3
- data/lib/chewy/{type → index}/adapter/object.rb +37 -31
- data/lib/chewy/{type → index}/adapter/orm.rb +23 -14
- data/lib/chewy/index/aliases.rb +14 -5
- data/lib/chewy/{type → index}/crutch.rb +5 -5
- data/lib/chewy/{type → index}/import.rb +62 -32
- data/lib/chewy/{type → index}/import/bulk_builder.rb +15 -13
- data/lib/chewy/{type → index}/import/bulk_request.rb +6 -7
- data/lib/chewy/{type → index}/import/journal_builder.rb +11 -12
- data/lib/chewy/{type → index}/import/routine.rb +19 -18
- data/lib/chewy/index/import/thread_safe_progress_bar.rb +40 -0
- data/lib/chewy/{type → index}/mapping.rb +27 -32
- data/lib/chewy/{type → index}/observe.rb +9 -19
- data/lib/chewy/index/specification.rb +1 -0
- data/lib/chewy/{type → index}/syncer.rb +60 -60
- data/lib/chewy/{type → index}/witchcraft.rb +11 -7
- data/lib/chewy/{type → index}/wrapper.rb +2 -2
- data/lib/chewy/journal.rb +8 -8
- data/lib/chewy/minitest/helpers.rb +9 -13
- data/lib/chewy/minitest/search_index_receiver.rb +22 -26
- data/lib/chewy/railtie.rb +6 -20
- data/lib/chewy/rake_helper.rb +83 -108
- data/lib/chewy/rspec/update_index.rb +47 -43
- data/lib/chewy/search.rb +4 -17
- data/lib/chewy/search/loader.rb +19 -41
- data/lib/chewy/search/parameters.rb +4 -2
- data/lib/chewy/search/parameters/concerns/query_storage.rb +2 -2
- data/lib/chewy/search/parameters/indices.rb +12 -57
- data/lib/chewy/search/parameters/source.rb +5 -1
- data/lib/chewy/search/query_proxy.rb +9 -2
- data/lib/chewy/search/request.rb +96 -119
- data/lib/chewy/search/response.rb +5 -5
- data/lib/chewy/search/scoping.rb +6 -7
- data/lib/chewy/search/scrolling.rb +13 -13
- data/lib/chewy/stash.rb +16 -27
- data/lib/chewy/strategy.rb +3 -19
- data/lib/chewy/strategy/sidekiq.rb +1 -0
- data/lib/chewy/version.rb +1 -1
- data/lib/generators/chewy/install_generator.rb +1 -1
- data/lib/tasks/chewy.rake +20 -32
- data/migration_guide.md +46 -8
- data/spec/chewy/config_spec.rb +14 -39
- data/spec/chewy/fields/base_spec.rb +414 -150
- data/spec/chewy/fields/root_spec.rb +20 -28
- data/spec/chewy/fields/time_fields_spec.rb +5 -5
- data/spec/chewy/index/actions_spec.rb +368 -59
- data/spec/chewy/{type → index}/adapter/active_record_spec.rb +68 -40
- data/spec/chewy/{type → index}/adapter/object_spec.rb +21 -6
- data/spec/chewy/index/aliases_spec.rb +3 -3
- data/spec/chewy/{type → index}/import/bulk_builder_spec.rb +23 -31
- data/spec/chewy/{type → index}/import/bulk_request_spec.rb +5 -12
- data/spec/chewy/{type → index}/import/journal_builder_spec.rb +9 -19
- data/spec/chewy/{type → index}/import/routine_spec.rb +16 -16
- data/spec/chewy/{type → index}/import_spec.rb +140 -96
- data/spec/chewy/index/mapping_spec.rb +135 -0
- data/spec/chewy/index/observe_spec.rb +116 -0
- data/spec/chewy/index/settings_spec.rb +3 -1
- data/spec/chewy/index/specification_spec.rb +20 -30
- data/spec/chewy/{type → index}/syncer_spec.rb +14 -19
- data/spec/chewy/{type → index}/witchcraft_spec.rb +20 -22
- data/spec/chewy/index/wrapper_spec.rb +100 -0
- data/spec/chewy/index_spec.rb +60 -105
- data/spec/chewy/journal_spec.rb +13 -26
- data/spec/chewy/minitest/helpers_spec.rb +13 -15
- data/spec/chewy/minitest/search_index_receiver_spec.rb +22 -26
- data/spec/chewy/multi_search_spec.rb +4 -5
- data/spec/chewy/rake_helper_spec.rb +145 -55
- data/spec/chewy/rspec/update_index_spec.rb +74 -71
- data/spec/chewy/runtime_spec.rb +2 -2
- data/spec/chewy/search/loader_spec.rb +19 -53
- data/spec/chewy/search/pagination/kaminari_examples.rb +3 -5
- data/spec/chewy/search/pagination/kaminari_spec.rb +1 -1
- data/spec/chewy/search/parameters/indices_spec.rb +26 -117
- data/spec/chewy/search/parameters/order_spec.rb +1 -1
- data/spec/chewy/search/parameters/query_storage_examples.rb +67 -21
- data/spec/chewy/search/parameters/search_after_spec.rb +4 -1
- data/spec/chewy/search/parameters/source_spec.rb +8 -2
- data/spec/chewy/search/parameters_spec.rb +12 -3
- data/spec/chewy/search/query_proxy_spec.rb +68 -17
- data/spec/chewy/search/request_spec.rb +234 -101
- data/spec/chewy/search/response_spec.rb +12 -12
- data/spec/chewy/search/scrolling_spec.rb +10 -17
- data/spec/chewy/search_spec.rb +32 -35
- data/spec/chewy/stash_spec.rb +9 -21
- data/spec/chewy/strategy/active_job_spec.rb +8 -8
- data/spec/chewy/strategy/atomic_spec.rb +9 -10
- data/spec/chewy/strategy/sidekiq_spec.rb +8 -8
- data/spec/chewy/strategy_spec.rb +19 -15
- data/spec/chewy_spec.rb +14 -100
- data/spec/spec_helper.rb +3 -21
- data/spec/support/active_record.rb +18 -7
- metadata +64 -106
- data/.circleci/config.yml +0 -240
- data/Appraisals +0 -81
- data/gemfiles/rails.5.2.mongoid.6.4.gemfile +0 -17
- data/gemfiles/sequel.4.45.gemfile +0 -11
- data/lib/chewy/search/pagination/will_paginate.rb +0 -43
- data/lib/chewy/search/parameters/types.rb +0 -20
- data/lib/chewy/strategy/resque.rb +0 -27
- data/lib/chewy/strategy/shoryuken.rb +0 -40
- data/lib/chewy/type.rb +0 -120
- data/lib/chewy/type/actions.rb +0 -43
- data/lib/chewy/type/adapter/mongoid.rb +0 -67
- data/lib/chewy/type/adapter/sequel.rb +0 -93
- data/lib/sequel/plugins/chewy_observe.rb +0 -63
- data/spec/chewy/search/pagination/will_paginate_examples.rb +0 -63
- data/spec/chewy/search/pagination/will_paginate_spec.rb +0 -23
- data/spec/chewy/search/parameters/types_spec.rb +0 -5
- data/spec/chewy/strategy/resque_spec.rb +0 -46
- data/spec/chewy/strategy/shoryuken_spec.rb +0 -70
- data/spec/chewy/type/actions_spec.rb +0 -50
- data/spec/chewy/type/adapter/mongoid_spec.rb +0 -372
- data/spec/chewy/type/adapter/sequel_spec.rb +0 -472
- data/spec/chewy/type/mapping_spec.rb +0 -175
- data/spec/chewy/type/observe_spec.rb +0 -137
- data/spec/chewy/type/wrapper_spec.rb +0 -100
- data/spec/chewy/type_spec.rb +0 -55
- data/spec/support/mongoid.rb +0 -93
- data/spec/support/sequel.rb +0 -80
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 70c6d061a7070669eafe4f28bd09cd8e7a9138d0a66dd6fdbdf1f387f3f3f0af
|
|
4
|
+
data.tar.gz: '03838f9c5e5b323e68482066b057bccff969e2826e581b994b92a962bb45e272'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8fcafb7b237abf426ed941e6b8d53b537db65186ce98f40b6c1b50257bc570b500b9bbff71aedb6828dfb0be11e13f031f3cf92413fd0f3efb5b860deca53a28
|
|
7
|
+
data.tar.gz: c74fe5e6db07346b9e77f4a0d294317a6ade800fa506f231d7368058a6f058785bb0c9756110378b810398a7bc24ca5c695bbb46c330a97976fd3b1bf6a8d3da
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug Report
|
|
3
|
+
about: Report an issue with Chewy you've discovered.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
*Be clear, concise and precise in your description of the problem.
|
|
7
|
+
Open an issue with a descriptive title and a summary in grammatically correct,
|
|
8
|
+
complete sentences.*
|
|
9
|
+
|
|
10
|
+
*Use the template below when reporting bugs. Please, make sure that
|
|
11
|
+
you're running the latest stable Chewy and that the problem you're reporting
|
|
12
|
+
hasn't been reported (and potentially fixed) already.*
|
|
13
|
+
|
|
14
|
+
*Before filing the ticket you should replace all text above the horizontal
|
|
15
|
+
rule with your own words.*
|
|
16
|
+
|
|
17
|
+
--------
|
|
18
|
+
|
|
19
|
+
## Expected behavior
|
|
20
|
+
|
|
21
|
+
Describe here how you expected Chewy to behave in this particular situation.
|
|
22
|
+
|
|
23
|
+
## Actual behavior
|
|
24
|
+
|
|
25
|
+
Describe here what actually happened.
|
|
26
|
+
|
|
27
|
+
## Steps to reproduce the problem
|
|
28
|
+
|
|
29
|
+
This is extremely important! Providing us with a reliable way to reproduce
|
|
30
|
+
a problem will expedite its solution.
|
|
31
|
+
|
|
32
|
+
## Version Information
|
|
33
|
+
|
|
34
|
+
Share here essential version information such as:
|
|
35
|
+
|
|
36
|
+
* Chewy version
|
|
37
|
+
* Elasticsearch version
|
|
38
|
+
* Ruby version
|
|
39
|
+
* Rails version
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature Request
|
|
3
|
+
about: Suggest new Chewy features or improvements to existing features.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Is your feature request related to a problem? Please describe.
|
|
7
|
+
|
|
8
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
9
|
+
|
|
10
|
+
## Describe the solution you'd like
|
|
11
|
+
|
|
12
|
+
A clear and concise description of what you want to happen.
|
|
13
|
+
|
|
14
|
+
## Describe alternatives you've considered
|
|
15
|
+
|
|
16
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
|
17
|
+
|
|
18
|
+
## Additional context
|
|
19
|
+
|
|
20
|
+
Add any other context or screenshots about the feature request here.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
**Replace this text with a summary of the changes in your PR.
|
|
2
|
+
The more detailed you are, the better.**
|
|
3
|
+
|
|
4
|
+
-----------------
|
|
5
|
+
|
|
6
|
+
Before submitting the PR make sure the following are checked:
|
|
7
|
+
|
|
8
|
+
* [ ] The PR relates to *only* one subject with a clear title and description in grammatically correct, complete sentences.
|
|
9
|
+
* [ ] Wrote [good commit messages][1].
|
|
10
|
+
* [ ] Commit message starts with `[Fix #issue-number]` (if the related issue exists).
|
|
11
|
+
* [ ] Feature branch is up-to-date with `master` (if not - rebase it).
|
|
12
|
+
* [ ] Squashed related commits together.
|
|
13
|
+
* [ ] Added tests.
|
|
14
|
+
* [ ] Added an entry to the changelog if the new code introduces user-observable changes. See [changelog entry format](https://github.com/toptal/chewy/blob/master/CONTRIBUTING.md#changelog-entry-format) for details.
|
|
15
|
+
|
|
16
|
+
[1]: https://chris.beams.io/posts/git-commit/
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on: [push]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
tests:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
strategy:
|
|
9
|
+
fail-fast: false
|
|
10
|
+
matrix:
|
|
11
|
+
ruby: [2.6, 2.7]
|
|
12
|
+
gemfile: [rails.5.2.activerecord, rails.6.0.activerecord, rails.6.1.activerecord]
|
|
13
|
+
name: ${{ matrix.ruby }}-${{ matrix.gemfile }}
|
|
14
|
+
|
|
15
|
+
env:
|
|
16
|
+
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v2
|
|
20
|
+
- uses: ruby/setup-ruby@v1
|
|
21
|
+
with:
|
|
22
|
+
ruby-version: ${{ matrix.ruby }}
|
|
23
|
+
bundler-cache: true
|
|
24
|
+
- name: Run Elasticsearch
|
|
25
|
+
uses: elastic/elastic-github-actions/elasticsearch@master
|
|
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
|
|
44
|
+
with:
|
|
45
|
+
stack-version: 7.10.1
|
|
46
|
+
port: 9250
|
|
47
|
+
- name: Tests
|
|
48
|
+
run: bundle exec rspec
|
|
49
|
+
|
|
50
|
+
rubocop:
|
|
51
|
+
runs-on: ubuntu-latest
|
|
52
|
+
steps:
|
|
53
|
+
- uses: actions/checkout@v2
|
|
54
|
+
- uses: ruby/setup-ruby@v1
|
|
55
|
+
with:
|
|
56
|
+
ruby-version: 2.7
|
|
57
|
+
bundler-cache: true
|
|
58
|
+
- run: bundle exec rubocop --format simple
|
data/.rubocop.yml
CHANGED
|
@@ -1,24 +1,31 @@
|
|
|
1
1
|
inherit_from: .rubocop_todo.yml
|
|
2
2
|
|
|
3
|
+
AllCops:
|
|
4
|
+
NewCops: enable
|
|
5
|
+
TargetRubyVersion: 2.6
|
|
6
|
+
|
|
3
7
|
Layout/AccessModifierIndentation:
|
|
4
8
|
EnforcedStyle: outdent
|
|
5
9
|
|
|
6
|
-
Layout/
|
|
10
|
+
Layout/HashAlignment:
|
|
7
11
|
EnforcedLastArgumentHashStyle: always_ignore
|
|
8
12
|
|
|
9
|
-
Layout/
|
|
13
|
+
Layout/ParameterAlignment:
|
|
10
14
|
EnforcedStyle: with_fixed_indentation
|
|
11
15
|
|
|
12
16
|
Layout/CaseIndentation:
|
|
13
17
|
EnforcedStyle: end
|
|
14
18
|
|
|
15
|
-
Layout/
|
|
19
|
+
Layout/EndAlignment:
|
|
20
|
+
EnforcedStyleAlignWith: variable
|
|
21
|
+
|
|
22
|
+
Layout/FirstArrayElementIndentation:
|
|
16
23
|
EnforcedStyle: consistent
|
|
17
24
|
|
|
18
|
-
Layout/
|
|
25
|
+
Layout/FirstHashElementIndentation:
|
|
19
26
|
EnforcedStyle: consistent
|
|
20
27
|
|
|
21
|
-
Layout/
|
|
28
|
+
Layout/HeredocIndentation:
|
|
22
29
|
Enabled: false
|
|
23
30
|
|
|
24
31
|
Layout/MultilineMethodCallIndentation:
|
|
@@ -33,9 +40,6 @@ Layout/SpaceInsideHashLiteralBraces:
|
|
|
33
40
|
Lint/AmbiguousBlockAssociation:
|
|
34
41
|
Enabled: false
|
|
35
42
|
|
|
36
|
-
Lint/EndAlignment:
|
|
37
|
-
EnforcedStyleAlignWith: variable
|
|
38
|
-
|
|
39
43
|
Style/Alias:
|
|
40
44
|
EnforcedStyle: prefer_alias_method
|
|
41
45
|
|
|
@@ -53,4 +57,5 @@ Metrics/BlockLength:
|
|
|
53
57
|
|
|
54
58
|
Metrics/ModuleLength:
|
|
55
59
|
Exclude:
|
|
60
|
+
- 'lib/chewy/rake_helper.rb'
|
|
56
61
|
- '**/*_spec.rb'
|
data/.rubocop_todo.yml
CHANGED
|
@@ -1,44 +1,132 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on
|
|
3
|
+
# on 2021-04-02 12:44:05 UTC using RuboCop version 1.11.0.
|
|
4
4
|
# The point is for the user to remove these configuration records
|
|
5
5
|
# one by one as the offenses are removed from the code base.
|
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
|
8
8
|
|
|
9
|
-
# Offense count:
|
|
9
|
+
# Offense count: 1
|
|
10
|
+
# Configuration parameters: Include.
|
|
11
|
+
# Include: **/*.gemspec
|
|
12
|
+
Gemspec/RequiredRubyVersion:
|
|
13
|
+
Exclude:
|
|
14
|
+
- 'chewy.gemspec'
|
|
15
|
+
|
|
16
|
+
# Offense count: 2
|
|
17
|
+
# Configuration parameters: AllowedMethods.
|
|
18
|
+
# AllowedMethods: enums
|
|
19
|
+
Lint/ConstantDefinitionInBlock:
|
|
20
|
+
Exclude:
|
|
21
|
+
- 'lib/chewy/rspec/update_index.rb'
|
|
22
|
+
- 'spec/chewy/config_spec.rb'
|
|
23
|
+
|
|
24
|
+
# Offense count: 10
|
|
25
|
+
# Configuration parameters: AllowComments, AllowEmptyLambdas.
|
|
26
|
+
Lint/EmptyBlock:
|
|
27
|
+
Exclude:
|
|
28
|
+
- 'spec/chewy/minitest/helpers_spec.rb'
|
|
29
|
+
- 'spec/chewy/rspec/update_index_spec.rb'
|
|
30
|
+
- 'spec/chewy/search/scrolling_spec.rb'
|
|
31
|
+
- 'spec/chewy/strategy/atomic_spec.rb'
|
|
32
|
+
- 'spec/chewy/strategy_spec.rb'
|
|
33
|
+
- 'spec/chewy/index/import/bulk_request_spec.rb'
|
|
34
|
+
- 'spec/chewy/index/witchcraft_spec.rb'
|
|
35
|
+
- 'spec/chewy_spec.rb'
|
|
36
|
+
|
|
37
|
+
# Offense count: 3
|
|
38
|
+
Lint/MissingSuper:
|
|
39
|
+
Exclude:
|
|
40
|
+
- 'lib/chewy/strategy/atomic.rb'
|
|
41
|
+
- 'lib/chewy/index/adapter/object.rb'
|
|
42
|
+
- 'lib/chewy/index/adapter/orm.rb'
|
|
43
|
+
|
|
44
|
+
# Offense count: 35
|
|
45
|
+
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
|
|
10
46
|
Metrics/AbcSize:
|
|
11
|
-
Max:
|
|
47
|
+
Max: 41
|
|
12
48
|
|
|
13
49
|
# Offense count: 4
|
|
14
|
-
# Configuration parameters: CountComments.
|
|
50
|
+
# Configuration parameters: CountComments, CountAsOne.
|
|
15
51
|
Metrics/ClassLength:
|
|
16
|
-
Max:
|
|
52
|
+
Max: 267
|
|
17
53
|
|
|
18
|
-
# Offense count:
|
|
54
|
+
# Offense count: 13
|
|
55
|
+
# Configuration parameters: IgnoredMethods.
|
|
19
56
|
Metrics/CyclomaticComplexity:
|
|
20
|
-
Max:
|
|
21
|
-
|
|
22
|
-
# Offense count: 1450
|
|
23
|
-
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
|
|
24
|
-
# URISchemes: http, https
|
|
25
|
-
Metrics/LineLength:
|
|
26
|
-
Max: 198
|
|
57
|
+
Max: 12
|
|
27
58
|
|
|
28
|
-
# Offense count:
|
|
29
|
-
# Configuration parameters: CountComments.
|
|
59
|
+
# Offense count: 43
|
|
60
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
|
30
61
|
Metrics/MethodLength:
|
|
31
|
-
Max:
|
|
62
|
+
Max: 29
|
|
32
63
|
|
|
33
|
-
# Offense count:
|
|
34
|
-
# Configuration parameters: CountComments.
|
|
64
|
+
# Offense count: 2
|
|
65
|
+
# Configuration parameters: CountComments, CountAsOne.
|
|
35
66
|
Metrics/ModuleLength:
|
|
36
|
-
Max:
|
|
67
|
+
Max: 158
|
|
37
68
|
|
|
38
|
-
# Offense count:
|
|
69
|
+
# Offense count: 18
|
|
70
|
+
# Configuration parameters: IgnoredMethods.
|
|
39
71
|
Metrics/PerceivedComplexity:
|
|
40
|
-
Max:
|
|
72
|
+
Max: 13
|
|
41
73
|
|
|
42
|
-
# Offense count:
|
|
74
|
+
# Offense count: 11
|
|
75
|
+
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers.
|
|
76
|
+
# SupportedStyles: snake_case, normalcase, non_integer
|
|
77
|
+
# AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339
|
|
78
|
+
Naming/VariableNumber:
|
|
79
|
+
Exclude:
|
|
80
|
+
- 'spec/chewy/fields/root_spec.rb'
|
|
81
|
+
|
|
82
|
+
# Offense count: 5
|
|
83
|
+
Style/DocumentDynamicEvalDefinition:
|
|
84
|
+
Exclude:
|
|
85
|
+
- 'lib/chewy/index/actions.rb'
|
|
86
|
+
- 'lib/chewy/repository.rb'
|
|
87
|
+
- 'lib/chewy/search/pagination/kaminari.rb'
|
|
88
|
+
- 'lib/chewy/index/crutch.rb'
|
|
89
|
+
- 'lib/chewy/index/witchcraft.rb'
|
|
90
|
+
|
|
91
|
+
# Offense count: 58
|
|
43
92
|
Style/Documentation:
|
|
44
93
|
Enabled: false
|
|
94
|
+
|
|
95
|
+
# Offense count: 2
|
|
96
|
+
# Cop supports --auto-correct.
|
|
97
|
+
Style/EvalWithLocation:
|
|
98
|
+
Exclude:
|
|
99
|
+
- 'spec/chewy/index_spec.rb'
|
|
100
|
+
|
|
101
|
+
# Offense count: 191
|
|
102
|
+
# Cop supports --auto-correct.
|
|
103
|
+
# Configuration parameters: EnforcedStyle.
|
|
104
|
+
# SupportedStyles: always, always_true, never
|
|
105
|
+
Style/FrozenStringLiteralComment:
|
|
106
|
+
Enabled: false
|
|
107
|
+
|
|
108
|
+
# Offense count: 2
|
|
109
|
+
# Configuration parameters: MinBodyLength.
|
|
110
|
+
Style/GuardClause:
|
|
111
|
+
Exclude:
|
|
112
|
+
- 'lib/chewy.rb'
|
|
113
|
+
- 'spec/support/active_record.rb'
|
|
114
|
+
|
|
115
|
+
# Offense count: 10
|
|
116
|
+
# Cop supports --auto-correct.
|
|
117
|
+
Style/IfUnlessModifier:
|
|
118
|
+
Exclude:
|
|
119
|
+
- 'lib/chewy.rb'
|
|
120
|
+
- 'lib/chewy/railtie.rb'
|
|
121
|
+
- 'lib/chewy/rspec/update_index.rb'
|
|
122
|
+
- 'lib/chewy/search/query_proxy.rb'
|
|
123
|
+
- 'lib/chewy/index/import.rb'
|
|
124
|
+
- 'lib/chewy/index/witchcraft.rb'
|
|
125
|
+
- 'spec/support/active_record.rb'
|
|
126
|
+
|
|
127
|
+
# Offense count: 53
|
|
128
|
+
# Cop supports --auto-correct.
|
|
129
|
+
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
|
130
|
+
# URISchemes: http, https
|
|
131
|
+
Layout/LineLength:
|
|
132
|
+
Max: 191
|
data/CHANGELOG.md
CHANGED
|
@@ -1,99 +1,193 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Changelog
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## master (unreleased)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
### New Features
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
### Changes
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
### Bugs Fixed
|
|
10
10
|
|
|
11
|
-
|
|
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][])
|
|
11
|
+
## 7.2.1 (2021-05-11)
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
### New Features
|
|
16
14
|
|
|
17
|
-
* [#
|
|
18
|
-
|
|
19
|
-
|
|
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][])
|
|
15
|
+
* [#469](https://github.com/toptal/chewy/issues/469): Add ability to output the progressbar with `ENV['PROGRESS']` during `reset` rake tasks ([@Vitalina-Vakulchyk][]):
|
|
16
|
+
* for `rake chewy:reset` and `rake chewy:parallel:reset`
|
|
17
|
+
* progressbar is hidden by default, set `ENV['PROGRESS']` to `true` to display it
|
|
21
18
|
|
|
22
|
-
|
|
19
|
+
### Bugs Fixed
|
|
23
20
|
|
|
24
|
-
|
|
21
|
+
* [#796](https://github.com/toptal/chewy/pull/796): Fix clear scroll: pass `scroll_id` in body, as passing in path parameters is deprecated and can overflow `http.max_initial_line_length` ([@rabotyaga][])
|
|
25
22
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
* [#
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
23
|
+
## 7.0.1 (2021-05-03)
|
|
24
|
+
|
|
25
|
+
### Changes
|
|
26
|
+
|
|
27
|
+
* [#792](https://github.com/toptal/chewy/pull/792): Skip ES version memoization for search requests ([@rabotyaga][])
|
|
28
|
+
* See the Migration Guide for details
|
|
29
|
+
|
|
30
|
+
## 7.2.0 (2021-04-19)
|
|
31
|
+
|
|
32
|
+
### New Features
|
|
33
|
+
|
|
34
|
+
* [#778](https://github.com/toptal/chewy/pull/778): Add `ignore_blank` option to `field` method ([@Vitalina-Vakulchyk][]):
|
|
35
|
+
* `true` by default for the `geo_point` type
|
|
36
|
+
* `false` by default for other types
|
|
37
|
+
|
|
38
|
+
### Changes
|
|
39
|
+
|
|
40
|
+
* [#783](https://github.com/toptal/chewy/pull/783): **(Breaking)** Remove `Chewy::Type`, simplify DSL ([@rabotyaga][])
|
|
41
|
+
* Remove the `Chewy::Type` class
|
|
42
|
+
* e.g. remove `CitiesIndex::City` / `CitiesIndex.city`
|
|
43
|
+
* `CitiesIndex::City.import! ...` becomes `CitiesIndex.import! ...`
|
|
44
|
+
* Simplify index DSL:
|
|
45
|
+
* `define_type` block -> `index_scope` clause
|
|
46
|
+
* it can be omitted completely, if you don't need to specify the scope or options, e.g. `name`
|
|
47
|
+
* Remove type names from string representations:
|
|
48
|
+
* in `update_index` ActiveRecord helper and RSpec matcher, e.g.
|
|
49
|
+
* `update_index('cities#city')` -> `update_index('cities')`
|
|
50
|
+
* `update_index(UsersIndex::User)` -> `update_index(UsersIndex)`
|
|
51
|
+
* in rake tasks (e.g. `rake chewy:update[cities#city]` -> `rake chewy:update[cities]`)
|
|
52
|
+
* in rake tasks output (e.g. `Imported CitiesIndex::City in 1s, stats: index 3` -> `Imported CitiesIndex in 1s, stats: index 3`)
|
|
53
|
+
* Use index name instead of type name in loader additional scope
|
|
54
|
+
* e.g. `CitiesIndex.filter(...).load(city: {scope: City.where(...)})` -> `CitiesIndex.filter(...).load(cities: {scope: City.where(...)})`
|
|
55
|
+
* [#692](https://github.com/toptal/chewy/issues/692): Add `.update_mapping` to Index class ([@Vitalina-Vakulchyk][]):
|
|
56
|
+
* Wrapped Elasticsearch gem `.put_mapping` with `.update_mapping` in Index class
|
|
57
|
+
* Add `rake chewy:update_mapping` task
|
|
58
|
+
* [#594](https://github.com/toptal/chewy/issues/594): Add `.reindex` to Index class ([@Vitalina-Vakulchyk][]):
|
|
59
|
+
* Wrapped Elasticsearch gem `.reindex` with `.reindex` in Index class
|
|
60
|
+
* Add `rake chewy:reindex` task
|
|
61
|
+
* [#679](https://github.com/toptal/chewy/issues/679): Wrapped `Elasticsearch::API::Indices::Actions#clear_cache` with `.clear_cache` in Index class ([@Vitalina-Vakulchyk][])
|
|
62
|
+
* [#495](https://github.com/toptal/chewy/issues/495): Ability to change Rails console strategy with `Chewy.console_strategy` ([@Vitalina-Vakulchyk][])
|
|
63
|
+
* [#778](https://github.com/toptal/chewy/pull/778): **(Breaking)** Drop support for Ruby 2.5 ([@Vitalina-Vakulchyk][])
|
|
64
|
+
* [#776](https://github.com/toptal/chewy/pull/776): **(Breaking)** Removal of unnecessary features and integrations ([@Vitalina-Vakulchyk][]):
|
|
65
|
+
* `aws-sdk-sqs` / `shoryuken`
|
|
66
|
+
* `mongoid`
|
|
67
|
+
* `sequel`
|
|
68
|
+
* `will_paginate`
|
|
69
|
+
* `resque`
|
|
70
|
+
* [#769](https://github.com/toptal/chewy/pull/769): **(Breaking)** Removal of deprecated methods and rake tasks ([@Vitalina-Vakulchyk][]):
|
|
71
|
+
* `Chewy::Index.index_params` is removed, use `Chewy::Index.specification_hash` instead
|
|
72
|
+
* `Chewy::Index.derivable_index_name` is removed, use `Chewy::Index.derivable_name` instead
|
|
73
|
+
* `Chewy::Index.default_prefix` is removed, use `Chewy::Index.prefix` instead
|
|
74
|
+
* `Chewy::Index.build_index_name` is removed, use `Chewy::Index.index_name` instead
|
|
75
|
+
* `Chewy::RakeHelper.reset_index` is removed, use `Chewy::RakeHelper.reset` instead
|
|
76
|
+
* `Chewy::RakeHelper.reset_all` is removed, use `Chewy::RakeHelper.reset` instead
|
|
77
|
+
* `Chewy::RakeHelper.update_index` is removed, use `Chewy::RakeHelper.update` instead
|
|
78
|
+
* `Chewy::RakeHelper.update_all` is removed, use `Chewy::RakeHelper.update` instead
|
|
79
|
+
* `rake chewy:apply_changes_from` is removed, use `rake chewy:journal:apply` instead
|
|
80
|
+
* `rake chewy:clean_journal` is removed, use `rake chewy:journal:clean` instead
|
|
81
|
+
|
|
82
|
+
## 7.1.0 (2021-03-03)
|
|
37
83
|
|
|
38
|
-
|
|
84
|
+
### Changes
|
|
39
85
|
|
|
40
|
-
|
|
86
|
+
* [#766](https://github.com/toptal/chewy/pull/766): **(Breaking)** Drop support for Elasticsearch 6.x ([@rabotyaga][])
|
|
87
|
+
* [#765](https://github.com/toptal/chewy/pull/765): Fix ruby 2.7 warnings in rake tasks ([@aglushkov][])
|
|
41
88
|
|
|
42
|
-
|
|
43
|
-
* [#647](https://github.com/toptal/chewy/pull/647): Support `search_type`, `request_cache`, and `allow_partial_search_results` as query string parameters ([@mattzollinhofer][])
|
|
89
|
+
### Bugs Fixed
|
|
44
90
|
|
|
45
|
-
|
|
91
|
+
* [#722](https://github.com/toptal/chewy/issues/722): Remove alias_method_chain, use Module#prepend instead ([@dalthon][])
|
|
46
92
|
|
|
47
|
-
|
|
48
|
-
* [#682](https://github.com/toptal/chewy/pull/682): Insert `RequestStrategy` middleware before `ActionDispatch::ShowExceptions` ([@dck][])
|
|
93
|
+
## 7.0.0 (2021-02-22)
|
|
49
94
|
|
|
50
|
-
|
|
95
|
+
### New Features
|
|
51
96
|
|
|
52
|
-
|
|
97
|
+
* [#763](https://github.com/toptal/chewy/pull/763): Added support for Elasticsearch 7 ([@rabotyaga][])
|
|
53
98
|
|
|
54
|
-
|
|
55
|
-
* `Chewy.default_field_type` is `text` now.
|
|
56
|
-
* `Chewy::Stash` was split onto two indexes - `Chewy::Stash::Specification` and `Chewy::Stash::Journal`
|
|
57
|
-
* Data for journal and specification is stored in binary fields base64-encoded to bypass the limits of other fields.
|
|
58
|
-
* [#626](https://github.com/toptal/chewy/pull/626): Don't underscore suggested index name ([@dm1try][])
|
|
99
|
+
### Changes
|
|
59
100
|
|
|
60
|
-
|
|
101
|
+
* [#757](https://github.com/toptal/chewy/pull/757): **(Breaking)** Fix `Chewy::Index.index` & `Chewy::Index.aliases` to correctly report indexes and aliases ([@mpeychich][], [@dalthon][])
|
|
102
|
+
* [#761](https://github.com/toptal/chewy/pull/761): Avoid fetching scope data to check if it is blank ([@dalthon][])
|
|
61
103
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
104
|
+
## 6.0.0 (2021-02-11)
|
|
105
|
+
|
|
106
|
+
### Changes
|
|
107
|
+
|
|
108
|
+
* [#743](https://github.com/toptal/chewy/pull/743): **(Breaking)** Elasticsearch 6.x support added. See the [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][])
|
|
109
|
+
* [#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][])
|
|
110
|
+
* [#755](https://github.com/toptal/chewy/pull/755): `attribute_highlights` returns an array of highlights. ([@musaffa][], [@dalthon][])
|
|
111
|
+
* [#753](https://github.com/toptal/chewy/pull/753): Add support for direct_import parameter to skip objects reloading. ([@TikiTDO][], [@dalthon][])
|
|
112
|
+
* [#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][])
|
|
113
|
+
|
|
114
|
+
### Bugs Fixed
|
|
115
|
+
|
|
116
|
+
* [#695](https://github.com/toptal/chewy/pull/695): Clear the scroll by id after completing `scroll_batches`. ([@socialchorus][])
|
|
117
|
+
* [#749](https://github.com/toptal/chewy/pull/749): Avoid importing everything when given an empty relation. ([@JF-Lalonde][], [@dalthon][])
|
|
118
|
+
* [#736](https://github.com/toptal/chewy/pull/736): Fix nil children when using witchcraft. ([@taylor-au][])
|
|
119
|
+
|
|
120
|
+
## 5.2.0 (2021-01-28)
|
|
121
|
+
|
|
122
|
+
### Changes
|
|
123
|
+
|
|
124
|
+
* [#734](https://github.com/toptal/chewy/pull/734): Add support for Ruby 3. ([@lowang][])
|
|
125
|
+
* [#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][])
|
|
126
|
+
* [#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][])
|
|
127
|
+
* Tweak some wording and formatting; add a note about compatibility; update copyright; remove broken logo; update the CI badge. ([@bbatsov][])
|
|
128
|
+
* [#714](https://github.com/toptal/chewy/pull/714): Update instructions for AWS ElasticSearch. ([@olancheg][])
|
|
129
|
+
* [#728](https://github.com/toptal/chewy/pull/728): Fix more ruby 2.7 keyword params deprecation warnings. ([@aglushkov][])
|
|
130
|
+
* [#715](https://github.com/toptal/chewy/pull/715): Fixed all deprecation warnings in Ruby 2.7. ([@gseddon][])
|
|
131
|
+
* [#718](https://github.com/toptal/chewy/pull/718): Added Ruby 2.7 to CircleCI config. ([@mrzasa][])
|
|
132
|
+
* [#707](https://github.com/toptal/chewy/pull/707): Allow configuration of Active Job queue name. ([@mrzasa][])
|
|
133
|
+
* [#711](https://github.com/toptal/chewy/pull/711): Setup CI on CircleCI. ([@mrzasa][])
|
|
134
|
+
* [#710](https://github.com/toptal/chewy/pull/710): Fix deprecation warning for constructing new `BigDecimal`. ([@AlexVPopov][])
|
|
135
|
+
|
|
136
|
+
## 5.1.0 (2019-09-24)
|
|
137
|
+
|
|
138
|
+
### Changes
|
|
139
|
+
|
|
140
|
+
* [#657](https://github.com/toptal/chewy/pull/657): **(Breaking)** Add support for multiple indices in request. ([@pyromaniac][])
|
|
141
|
+
* [#647](https://github.com/toptal/chewy/pull/647): **(Breaking)** Support `search_type`, `request_cache`, and `allow_partial_search_results` as query string parameters. ([@mattzollinhofer][])
|
|
142
|
+
* [#606](https://github.com/toptal/chewy/pull/606): Speed up imports when `bulk_size` is specified. ([@yahooguntu][])
|
|
143
|
+
* [#682](https://github.com/toptal/chewy/pull/682): Insert `RequestStrategy` middleware before `ActionDispatch::ShowExceptions`. ([@dck][])
|
|
144
|
+
|
|
145
|
+
## 5.0.0 (2018-02-13)
|
|
146
|
+
|
|
147
|
+
### Changes
|
|
148
|
+
|
|
149
|
+
* **(Breaking)** Align the gem version with the most recent ElasticSearch version we support.
|
|
150
|
+
* **(Breaking)** `Chewy.default_field_type` is `text` now.
|
|
151
|
+
* **(Breaking)** `Chewy::Stash` was split onto two indexes - `Chewy::Stash::Specification` and `Chewy::Stash::Journal`.
|
|
152
|
+
* **(Breaking)** Data for journal and specification is stored in binary fields base64-encoded to bypass the limits of other fields.
|
|
153
|
+
* **(Breaking)** [#626](https://github.com/toptal/chewy/pull/626): Don't underscore suggested index name. ([@dm1try][])
|
|
154
|
+
* [#598](https://github.com/toptal/chewy/pull/598): `pipeline` import option support. ([@eManPrague][])
|
|
155
|
+
* [#625](https://github.com/toptal/chewy/pull/625): Proper Rails check. ([@nattfodd][])
|
|
156
|
+
* [#623](https://github.com/toptal/chewy/pull/623): Bypass strategy performance improvements. ([@DNNX][])
|
|
157
|
+
* [#620](https://github.com/toptal/chewy/pull/620): Avoid index update calls for empty data. ([@robertasg][])
|
|
66
158
|
* Do not underscore suggested index name on `Chewy::Index.index_name` call.
|
|
67
159
|
* 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.
|
|
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][])
|
|
160
|
+
* [#565](https://github.com/toptal/chewy/pull/565): Fixed some Sequel deprecation warnings. ([@arturtr][])
|
|
161
|
+
* [#577](https://github.com/toptal/chewy/pull/577): Fixed some Sequel deprecation warnings. ([@matchbookmac][])
|
|
162
|
+
|
|
163
|
+
### Bugs Fixed
|
|
70
164
|
|
|
71
|
-
|
|
165
|
+
* [#593](https://github.com/toptal/chewy/pull/593): Fixed index settings logic error. ([@yahooguntu][])
|
|
166
|
+
* [#567](https://github.com/toptal/chewy/pull/567): Missed check in higlight method. ([@heartfulbird][])
|
|
72
167
|
|
|
73
|
-
|
|
74
|
-
* [#567](https://github.com/toptal/chewy/pull/567): Missed check in higlight method ([@heartfulbird][])
|
|
168
|
+
-----------------------------------------------------------------------------------
|
|
75
169
|
|
|
76
|
-
|
|
170
|
+
## 0.10.1
|
|
77
171
|
|
|
78
|
-
|
|
172
|
+
### Changes
|
|
79
173
|
|
|
80
174
|
* [#558](https://github.com/toptal/chewy/pull/558): Improved parallel worker titles
|
|
81
175
|
|
|
82
|
-
|
|
176
|
+
### Bugs Fixed
|
|
83
177
|
|
|
84
178
|
* [#557](https://github.com/toptal/chewy/pull/557): Fixed request strategy initial debug message
|
|
85
179
|
* [#556](https://github.com/toptal/chewy/pull/556): Fixed will objects paginated array initialization when pagination was not used
|
|
86
180
|
* [#555](https://github.com/toptal/chewy/pull/555): Fixed fields symbol/string value
|
|
87
181
|
* [#554](https://github.com/toptal/chewy/pull/554): Fixed root field value proc
|
|
88
182
|
|
|
89
|
-
|
|
183
|
+
## 0.10.0
|
|
90
184
|
|
|
91
|
-
|
|
185
|
+
### Breaking changes
|
|
92
186
|
|
|
93
187
|
* Changed behavior of `Chewy::Index.index_name`, it doesn't cache the values anymore.
|
|
94
188
|
* Journal interfaces, related code and rake tasks were completely refactored and are not compatible with the previous version.
|
|
95
189
|
|
|
96
|
-
|
|
190
|
+
### Changes
|
|
97
191
|
|
|
98
192
|
* [#543](https://github.com/toptal/chewy/pull/543): Less noisy strategies logging ([@Borzik][])
|
|
99
193
|
* Parallel import and the corresponding rake tasks.
|
|
@@ -116,9 +210,9 @@
|
|
|
116
210
|
* [#467](https://github.com/toptal/chewy/pull/467): Bulk indexing optimizations with new additional options ([@eproulx-petalmd][])
|
|
117
211
|
* [#438](https://github.com/toptal/chewy/pull/438): Configurable sidekiq options ([@averell23][])
|
|
118
212
|
|
|
119
|
-
|
|
213
|
+
## 0.9.0
|
|
120
214
|
|
|
121
|
-
|
|
215
|
+
### Changes
|
|
122
216
|
|
|
123
217
|
* [#443](https://github.com/toptal/chewy/pull/443): Add `preference` param to Query ([@menglewis][])
|
|
124
218
|
* [#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][])
|
|
@@ -134,16 +228,16 @@
|
|
|
134
228
|
* Witchcraft™ supports dynamically generated procs with variables from closure.
|
|
135
229
|
* Added `Query#preference` for specifying shard replicas to query against. ([@menglewis][])
|
|
136
230
|
|
|
137
|
-
|
|
231
|
+
### Bugs Fixed
|
|
138
232
|
|
|
139
233
|
* [#415](https://github.com/toptal/chewy/pull/415): `.script_fields` method in the Index class ([@dmitry][])
|
|
140
234
|
* [#398](https://github.com/toptal/chewy/pull/398): Fix routing_missing_exception on delete with parent missing ([@guigs][])
|
|
141
235
|
* [#385](https://github.com/toptal/chewy/pull/385): Sequel custom primary keys handling fix ([@okliv][])
|
|
142
236
|
* [#374](https://github.com/toptal/chewy/pull/374): Bulk import fixes ([@0x0badc0de][])
|
|
143
237
|
|
|
144
|
-
|
|
238
|
+
## 0.8.4
|
|
145
239
|
|
|
146
|
-
|
|
240
|
+
### Changes
|
|
147
241
|
|
|
148
242
|
* Brand new import `:bulk_size` option, set desired ElasticSearch bulk size in bytes
|
|
149
243
|
* Witchcraft™ technology
|
|
@@ -159,7 +253,7 @@
|
|
|
159
253
|
* Accessing types with methods is deprecated. Use `MyIndex::MyType` constant reference instead of `MyIndex.my_type` method.
|
|
160
254
|
* [#294](https://github.com/toptal/chewy/pull/294): Sequel adapter improvements ([@mrbrdo][])
|
|
161
255
|
|
|
162
|
-
|
|
256
|
+
### Bugs Fixed
|
|
163
257
|
|
|
164
258
|
* [#325](https://github.com/toptal/chewy/pull/325): Mongoid atomic strategy fix
|
|
165
259
|
* [#324](https://github.com/toptal/chewy/pull/324): Method missing fix ([@jesjos][])
|
|
@@ -167,18 +261,18 @@
|
|
|
167
261
|
* [#306](https://github.com/toptal/chewy/pull/306): Better errors handling in strategies ([@barthez][])
|
|
168
262
|
* [#303](https://github.com/toptal/chewy/pull/303): Assets strategies silencer fix for Rails 5 API mode ([@clupprich][])
|
|
169
263
|
|
|
170
|
-
|
|
264
|
+
## 0.8.3
|
|
171
265
|
|
|
172
|
-
|
|
266
|
+
### Breaking changes:
|
|
173
267
|
|
|
174
268
|
* `Chewy.atomic` and `Chewy.urgent_update=` methods was removed from the codebase, use `Chewy.strategy` block instead.
|
|
175
269
|
* `delete_from_index?` hook is removed from the codebase.
|
|
176
270
|
|
|
177
|
-
|
|
271
|
+
### Changes
|
|
178
272
|
|
|
179
273
|
* Sequel support completely reworked to use common ORM implementations + better sequel specs covarage.
|
|
180
274
|
|
|
181
|
-
|
|
275
|
+
### Bugs Fixed
|
|
182
276
|
|
|
183
277
|
* Sequel objects transactional destruction fix
|
|
184
278
|
* Correct Rspec mocking framework checking ([@mainameiz][])
|
|
@@ -186,9 +280,9 @@
|
|
|
186
280
|
* Safe unsubscribe on import ([@marshall-lee][])
|
|
187
281
|
* Correct custom assets path silencer ([@davekaro][])
|
|
188
282
|
|
|
189
|
-
|
|
283
|
+
## 0.8.2
|
|
190
284
|
|
|
191
|
-
|
|
285
|
+
### Changes
|
|
192
286
|
|
|
193
287
|
* ActiveJob strategy by [@mkcode][]
|
|
194
288
|
* Async strategies tweak ([@AndreySavelyev][])
|
|
@@ -200,23 +294,23 @@
|
|
|
200
294
|
* Multiple grammar fixes ([@henrebotha][])
|
|
201
295
|
* Ability to pass a proc to `update_index` to define updating index dynamically ([@SeTeM][])
|
|
202
296
|
|
|
203
|
-
|
|
297
|
+
### Bugs Fixed
|
|
204
298
|
|
|
205
299
|
* Fixed transport logger and tracer configuration
|
|
206
300
|
|
|
207
|
-
|
|
301
|
+
## 0.8.1
|
|
208
302
|
|
|
209
|
-
|
|
303
|
+
### Bugs Fixed
|
|
210
304
|
|
|
211
305
|
* Added support of elasticsearch-ruby 1.0.10
|
|
212
306
|
|
|
213
|
-
|
|
307
|
+
## 0.8.0
|
|
214
308
|
|
|
215
|
-
|
|
309
|
+
### Breaking changes:
|
|
216
310
|
|
|
217
311
|
* `:atomic` and `:urgent` strategies are using `import!` method raising exceptions
|
|
218
312
|
|
|
219
|
-
|
|
313
|
+
### Changes
|
|
220
314
|
|
|
221
315
|
* Crutches™ technology
|
|
222
316
|
* Added `.script_fields` chainable method to query ([@ka8725][])
|
|
@@ -225,14 +319,14 @@
|
|
|
225
319
|
* `:sidekiq` async strategy (inspired by [@sharkzp][])
|
|
226
320
|
* Added `Query#search_type` for `search_type` request option setup ([@marshall-lee][])
|
|
227
321
|
|
|
228
|
-
|
|
322
|
+
### Bugs Fixed
|
|
229
323
|
|
|
230
324
|
* Rails 4.2 migrations are not raising UndefinedUpdateStrategy anymore on data updates
|
|
231
325
|
* Mongoid random failing specs fixes ([@marshall-lee][])
|
|
232
326
|
|
|
233
|
-
|
|
327
|
+
## 0.7.0
|
|
234
328
|
|
|
235
|
-
|
|
329
|
+
### Breaking changes:
|
|
236
330
|
|
|
237
331
|
* `Chewy.use_after_commit_callbacks = false` returns previous RDBMS behavior in tests
|
|
238
332
|
* ActiveRecord import is now called after_commit instead of after_save and after_destroy
|
|
@@ -265,7 +359,7 @@
|
|
|
265
359
|
end
|
|
266
360
|
```
|
|
267
361
|
|
|
268
|
-
|
|
362
|
+
### Changes
|
|
269
363
|
|
|
270
364
|
* Multiple enhancements by [@DNNX][]
|
|
271
365
|
* Added `script_fields` to search criteria ([@ka8725][])
|
|
@@ -306,61 +400,61 @@
|
|
|
306
400
|
```
|
|
307
401
|
* Implemented basic named scopes
|
|
308
402
|
|
|
309
|
-
|
|
403
|
+
### Bugs Fixed
|
|
310
404
|
|
|
311
405
|
* `script_score` allow options ([@joeljunstrom][])
|
|
312
406
|
* Chewy indexes eaged loading fixes ([@leemhenson][])
|
|
313
407
|
* `Chewy::Index.import nil` imports nothing instead of initial data
|
|
314
408
|
|
|
315
|
-
|
|
409
|
+
## 0.6.2
|
|
316
410
|
|
|
317
|
-
|
|
411
|
+
### Changes
|
|
318
412
|
|
|
319
413
|
* document root id custom value option ([@baronworks][])
|
|
320
414
|
|
|
321
|
-
|
|
415
|
+
### Bugs Fixed
|
|
322
416
|
|
|
323
417
|
* Removed decay function defaults ([@Linuus][])
|
|
324
418
|
* Correct config file handling in case of empty file
|
|
325
419
|
|
|
326
|
-
|
|
420
|
+
## 0.6.1
|
|
327
421
|
|
|
328
|
-
|
|
422
|
+
### Changes
|
|
329
423
|
|
|
330
424
|
* `min_score` query option support ([@jshirley][])
|
|
331
425
|
* `Chewy::Query#find` method for finding documents by id
|
|
332
426
|
|
|
333
|
-
|
|
427
|
+
## 0.6.0
|
|
334
428
|
|
|
335
|
-
|
|
429
|
+
### Changes
|
|
336
430
|
|
|
337
431
|
* Mongoid support YaY! ([@fabiotomio][], [@leemhenson][])
|
|
338
432
|
* `urgent: true` option for `update_index` is deprecated and will be removed soon, use `Chewy.atomic` instead
|
|
339
433
|
* `timeout` and `timed_out` support ([@MarkMurphy][])
|
|
340
434
|
* will_paginate support ([@josecoelho][])
|
|
341
435
|
|
|
342
|
-
|
|
436
|
+
### Bugs Fixed
|
|
343
437
|
|
|
344
438
|
* All the query chainable methods delegated to indexes and types (partially [@Linuus][])
|
|
345
439
|
|
|
346
|
-
|
|
440
|
+
## 0.5.2
|
|
347
441
|
|
|
348
|
-
|
|
442
|
+
### Breaking changes:
|
|
349
443
|
|
|
350
444
|
* `Chewy::Type::Base` removed in favour of using `Chewy::Type` as a base class for all types
|
|
351
445
|
|
|
352
|
-
|
|
446
|
+
### Changes
|
|
353
447
|
|
|
354
448
|
* `Chewy.massacre` aliased to `Chewy.delete_all` method deletes all the indexes with current prefix
|
|
355
449
|
|
|
356
|
-
|
|
450
|
+
### Bugs Fixed:
|
|
357
451
|
|
|
358
452
|
* Advanced type classes resolving ([@inbeom][])
|
|
359
453
|
* `import` ignores nil
|
|
360
454
|
|
|
361
|
-
|
|
455
|
+
## 0.5.1
|
|
362
456
|
|
|
363
|
-
|
|
457
|
+
### Changes:
|
|
364
458
|
|
|
365
459
|
* `chewy.yml` Rails generator ([@jirikolarik][])
|
|
366
460
|
* Parent-child mappings feature support ([@inbeom][])
|
|
@@ -370,20 +464,20 @@
|
|
|
370
464
|
* Rspec 3 `update_index` matcher support ([@jimmybaker][])
|
|
371
465
|
* Implemented function scoring ([@averell23][])
|
|
372
466
|
|
|
373
|
-
|
|
467
|
+
### Bugs Fixed:
|
|
374
468
|
|
|
375
469
|
* Indexed eager-loading fix ([@leemhenson][])
|
|
376
470
|
* Field type deriving nested type support fix ([@rschellhorn][])
|
|
377
471
|
|
|
378
|
-
|
|
472
|
+
## 0.5.0
|
|
379
473
|
|
|
380
|
-
|
|
474
|
+
### Breaking changes:
|
|
381
475
|
|
|
382
476
|
* 404 exception (IndexMissingException) while query is swallowed and treated like an empty result set.
|
|
383
477
|
* `load` and `preload` for queries became lazy. Might be partially incompatible.
|
|
384
478
|
* 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)
|
|
385
479
|
|
|
386
|
-
|
|
480
|
+
### Changes:
|
|
387
481
|
|
|
388
482
|
* `suggest` query options support ([@rschellhorn][]).
|
|
389
483
|
* Added hash data support. How it is possible to pass hashes to import.
|
|
@@ -397,7 +491,7 @@
|
|
|
397
491
|
* `highlight` and `rescore` query options support.
|
|
398
492
|
* config/chewy.yml ERB support.
|
|
399
493
|
|
|
400
|
-
|
|
494
|
+
### Bugs Fixed:
|
|
401
495
|
|
|
402
496
|
* Fixed `missing` and `exists` filters DSL constructors.
|
|
403
497
|
* Reworked index data composing.
|
|
@@ -405,7 +499,7 @@
|
|
|
405
499
|
* Correct waiting for status. After index creation, bulk import, and deletion.
|
|
406
500
|
* [#23](https://github.com/toptal/chewy/pull/23): Fix "wrong constant name" with namespace models
|
|
407
501
|
|
|
408
|
-
|
|
502
|
+
## 0.4.0
|
|
409
503
|
|
|
410
504
|
* Changed `update_index` matcher behavior. Now it compare array attributes position-independently.
|
|
411
505
|
* Search aggregations API support ([@arion][]).
|
|
@@ -416,18 +510,18 @@
|
|
|
416
510
|
* `import` now creates index before performing.
|
|
417
511
|
* `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.
|
|
418
512
|
|
|
419
|
-
|
|
513
|
+
## 0.3.0
|
|
420
514
|
|
|
421
515
|
* Added `Chewy.configuration[:index]` config to setup common indexes options.
|
|
422
516
|
* `Chewy.client_options` replaced with `Chewy.configuration`
|
|
423
517
|
* Using source filtering instead of fields filter (http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-source-filtering.html).
|
|
424
518
|
|
|
425
|
-
|
|
519
|
+
## 0.2.3
|
|
426
520
|
|
|
427
521
|
* `.import!` indexes method, raises import errors.
|
|
428
522
|
* `.import!` types method, raises import errors. Useful for specs.
|
|
429
523
|
|
|
430
|
-
|
|
524
|
+
## 0.2.2
|
|
431
525
|
|
|
432
526
|
* Support for `none` scope ([@undr][]).
|
|
433
527
|
* Auto-resolved analyzers and analyzers repository ([@webgago][]):
|
|
@@ -443,7 +537,7 @@
|
|
|
443
537
|
```
|
|
444
538
|
`title_analyzer` here will be automatically resolved and passed to index mapping
|
|
445
539
|
|
|
446
|
-
|
|
540
|
+
## 0.2.0
|
|
447
541
|
|
|
448
542
|
* 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.
|
|
449
543
|
* `Chewy::Index.import` now takes types hash as argument within options hash:
|
|
@@ -461,7 +555,7 @@
|
|
|
461
555
|
`CitiesIndex.all.load(scope: {city: -> { include(:country) }})`
|
|
462
556
|
`CitiesIndex.all.load(scope: ->{ include(:country) })`
|
|
463
557
|
|
|
464
|
-
|
|
558
|
+
## 0.1.0
|
|
465
559
|
|
|
466
560
|
* Added filters simplified DSL. See [filters.rb](lib/chewy/query/filters.rb) for more details.
|
|
467
561
|
* Queries and filters join system reworked. See [query.rb](lib/chewy/query.rb) for more details.
|
|
@@ -498,7 +592,7 @@
|
|
|
498
592
|
* Implemented isolated adapters to simplify adding new ORMs
|
|
499
593
|
* Query DLS chainable methods delegated to index class (no longer need to call MyIndex.search.query, just MyIndex.query)
|
|
500
594
|
|
|
501
|
-
|
|
595
|
+
## 0.0.1
|
|
502
596
|
|
|
503
597
|
* Query DSL
|
|
504
598
|
* Basic index handling
|
|
@@ -584,5 +678,6 @@
|
|
|
584
678
|
[@taylor-au]: https://github.com/taylor-au
|
|
585
679
|
[@TikiTDO]: https://github.com/TikiTDO
|
|
586
680
|
[@undr]: https://github.com/undr
|
|
681
|
+
[@Vitalina-Vakulchyk]: https://github.com/Vitalina-Vakulchyk
|
|
587
682
|
[@webgago]: https://github.com/webgago
|
|
588
683
|
[@yahooguntu]: https://github.com/yahooguntu
|