chewy 5.1.0 → 7.2.0

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