chewy 6.0.0 → 7.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. checksums.yaml +4 -4
  2. data/.github/CODEOWNERS +1 -0
  3. data/.github/ISSUE_TEMPLATE/bug_report.md +39 -0
  4. data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  5. data/.github/PULL_REQUEST_TEMPLATE.md +16 -0
  6. data/.github/dependabot.yml +42 -0
  7. data/.github/workflows/ruby.yml +60 -0
  8. data/.rubocop.yml +16 -8
  9. data/.rubocop_todo.yml +110 -22
  10. data/CHANGELOG.md +396 -105
  11. data/CODE_OF_CONDUCT.md +14 -0
  12. data/CONTRIBUTING.md +63 -0
  13. data/Gemfile +4 -10
  14. data/Guardfile +3 -1
  15. data/README.md +497 -275
  16. data/chewy.gemspec +5 -20
  17. data/gemfiles/base.gemfile +12 -0
  18. data/gemfiles/rails.6.1.activerecord.gemfile +10 -15
  19. data/gemfiles/rails.7.0.activerecord.gemfile +14 -0
  20. data/gemfiles/rails.7.1.activerecord.gemfile +14 -0
  21. data/lib/chewy/config.rb +60 -52
  22. data/lib/chewy/elastic_client.rb +31 -0
  23. data/lib/chewy/errors.rb +7 -10
  24. data/lib/chewy/fields/base.rb +79 -13
  25. data/lib/chewy/fields/root.rb +4 -14
  26. data/lib/chewy/index/actions.rb +54 -37
  27. data/lib/chewy/{type → index}/adapter/active_record.rb +30 -6
  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 +17 -18
  31. data/lib/chewy/index/aliases.rb +14 -5
  32. data/lib/chewy/index/crutch.rb +40 -0
  33. data/lib/chewy/index/import/bulk_builder.rb +311 -0
  34. data/lib/chewy/{type → index}/import/bulk_request.rb +6 -7
  35. data/lib/chewy/{type → index}/import/journal_builder.rb +11 -12
  36. data/lib/chewy/{type → index}/import/routine.rb +18 -17
  37. data/lib/chewy/{type → index}/import.rb +76 -32
  38. data/lib/chewy/{type → index}/mapping.rb +29 -34
  39. data/lib/chewy/index/observe/active_record_methods.rb +87 -0
  40. data/lib/chewy/index/observe/callback.rb +34 -0
  41. data/lib/chewy/index/observe.rb +17 -0
  42. data/lib/chewy/index/specification.rb +1 -0
  43. data/lib/chewy/{type → index}/syncer.rb +59 -59
  44. data/lib/chewy/{type → index}/witchcraft.rb +11 -7
  45. data/lib/chewy/{type → index}/wrapper.rb +2 -2
  46. data/lib/chewy/index.rb +67 -94
  47. data/lib/chewy/journal.rb +25 -14
  48. data/lib/chewy/log_subscriber.rb +5 -1
  49. data/lib/chewy/minitest/helpers.rb +86 -13
  50. data/lib/chewy/minitest/search_index_receiver.rb +24 -26
  51. data/lib/chewy/railtie.rb +6 -20
  52. data/lib/chewy/rake_helper.rb +169 -113
  53. data/lib/chewy/rspec/build_query.rb +12 -0
  54. data/lib/chewy/rspec/helpers.rb +55 -0
  55. data/lib/chewy/rspec/update_index.rb +55 -44
  56. data/lib/chewy/rspec.rb +2 -0
  57. data/lib/chewy/runtime/version.rb +1 -1
  58. data/lib/chewy/runtime.rb +1 -1
  59. data/lib/chewy/search/loader.rb +19 -41
  60. data/lib/chewy/search/parameters/collapse.rb +16 -0
  61. data/lib/chewy/search/parameters/concerns/query_storage.rb +2 -2
  62. data/lib/chewy/search/parameters/ignore_unavailable.rb +27 -0
  63. data/lib/chewy/search/parameters/indices.rb +13 -58
  64. data/lib/chewy/search/parameters/knn.rb +16 -0
  65. data/lib/chewy/search/parameters/order.rb +6 -19
  66. data/lib/chewy/search/parameters/source.rb +5 -1
  67. data/lib/chewy/search/parameters/storage.rb +1 -1
  68. data/lib/chewy/search/parameters/track_total_hits.rb +16 -0
  69. data/lib/chewy/search/parameters.rb +6 -4
  70. data/lib/chewy/search/query_proxy.rb +9 -2
  71. data/lib/chewy/search/request.rb +169 -134
  72. data/lib/chewy/search/response.rb +5 -5
  73. data/lib/chewy/search/scoping.rb +7 -8
  74. data/lib/chewy/search/scrolling.rb +13 -13
  75. data/lib/chewy/search.rb +9 -19
  76. data/lib/chewy/stash.rb +19 -30
  77. data/lib/chewy/strategy/active_job.rb +1 -1
  78. data/lib/chewy/strategy/atomic_no_refresh.rb +18 -0
  79. data/lib/chewy/strategy/base.rb +10 -0
  80. data/lib/chewy/strategy/delayed_sidekiq/scheduler.rb +168 -0
  81. data/lib/chewy/strategy/delayed_sidekiq/worker.rb +76 -0
  82. data/lib/chewy/strategy/delayed_sidekiq.rb +30 -0
  83. data/lib/chewy/strategy/lazy_sidekiq.rb +64 -0
  84. data/lib/chewy/strategy/sidekiq.rb +2 -1
  85. data/lib/chewy/strategy.rb +6 -19
  86. data/lib/chewy/version.rb +1 -1
  87. data/lib/chewy.rb +39 -86
  88. data/lib/generators/chewy/install_generator.rb +1 -1
  89. data/lib/tasks/chewy.rake +36 -32
  90. data/migration_guide.md +46 -8
  91. data/spec/chewy/config_spec.rb +16 -41
  92. data/spec/chewy/elastic_client_spec.rb +26 -0
  93. data/spec/chewy/fields/base_spec.rb +432 -147
  94. data/spec/chewy/fields/root_spec.rb +20 -28
  95. data/spec/chewy/fields/time_fields_spec.rb +5 -5
  96. data/spec/chewy/index/actions_spec.rb +368 -59
  97. data/spec/chewy/{type → index}/adapter/active_record_spec.rb +156 -40
  98. data/spec/chewy/{type → index}/adapter/object_spec.rb +21 -6
  99. data/spec/chewy/index/aliases_spec.rb +3 -3
  100. data/spec/chewy/index/import/bulk_builder_spec.rb +494 -0
  101. data/spec/chewy/{type → index}/import/bulk_request_spec.rb +5 -12
  102. data/spec/chewy/{type → index}/import/journal_builder_spec.rb +9 -19
  103. data/spec/chewy/{type → index}/import/routine_spec.rb +19 -19
  104. data/spec/chewy/{type → index}/import_spec.rb +164 -98
  105. data/spec/chewy/index/mapping_spec.rb +135 -0
  106. data/spec/chewy/index/observe/active_record_methods_spec.rb +68 -0
  107. data/spec/chewy/index/observe/callback_spec.rb +139 -0
  108. data/spec/chewy/index/observe_spec.rb +143 -0
  109. data/spec/chewy/index/settings_spec.rb +3 -1
  110. data/spec/chewy/index/specification_spec.rb +20 -30
  111. data/spec/chewy/{type → index}/syncer_spec.rb +14 -19
  112. data/spec/chewy/{type → index}/witchcraft_spec.rb +20 -22
  113. data/spec/chewy/index/wrapper_spec.rb +100 -0
  114. data/spec/chewy/index_spec.rb +60 -105
  115. data/spec/chewy/journal_spec.rb +25 -74
  116. data/spec/chewy/minitest/helpers_spec.rb +123 -15
  117. data/spec/chewy/minitest/search_index_receiver_spec.rb +28 -30
  118. data/spec/chewy/multi_search_spec.rb +4 -5
  119. data/spec/chewy/rake_helper_spec.rb +315 -55
  120. data/spec/chewy/rspec/build_query_spec.rb +34 -0
  121. data/spec/chewy/rspec/helpers_spec.rb +61 -0
  122. data/spec/chewy/rspec/update_index_spec.rb +74 -71
  123. data/spec/chewy/runtime_spec.rb +2 -2
  124. data/spec/chewy/search/loader_spec.rb +19 -53
  125. data/spec/chewy/search/pagination/kaminari_examples.rb +4 -6
  126. data/spec/chewy/search/pagination/kaminari_spec.rb +2 -2
  127. data/spec/chewy/search/parameters/collapse_spec.rb +5 -0
  128. data/spec/chewy/search/parameters/ignore_unavailable_spec.rb +67 -0
  129. data/spec/chewy/search/parameters/indices_spec.rb +26 -117
  130. data/spec/chewy/search/parameters/knn_spec.rb +5 -0
  131. data/spec/chewy/search/parameters/order_spec.rb +18 -11
  132. data/spec/chewy/search/parameters/query_storage_examples.rb +67 -21
  133. data/spec/chewy/search/parameters/search_after_spec.rb +4 -1
  134. data/spec/chewy/search/parameters/source_spec.rb +8 -2
  135. data/spec/chewy/search/parameters/track_total_hits_spec.rb +5 -0
  136. data/spec/chewy/search/parameters_spec.rb +18 -4
  137. data/spec/chewy/search/query_proxy_spec.rb +68 -17
  138. data/spec/chewy/search/request_spec.rb +292 -110
  139. data/spec/chewy/search/response_spec.rb +12 -12
  140. data/spec/chewy/search/scrolling_spec.rb +10 -17
  141. data/spec/chewy/search_spec.rb +40 -34
  142. data/spec/chewy/stash_spec.rb +9 -21
  143. data/spec/chewy/strategy/active_job_spec.rb +16 -16
  144. data/spec/chewy/strategy/atomic_no_refresh_spec.rb +60 -0
  145. data/spec/chewy/strategy/atomic_spec.rb +9 -10
  146. data/spec/chewy/strategy/delayed_sidekiq_spec.rb +208 -0
  147. data/spec/chewy/strategy/lazy_sidekiq_spec.rb +214 -0
  148. data/spec/chewy/strategy/sidekiq_spec.rb +12 -12
  149. data/spec/chewy/strategy_spec.rb +19 -15
  150. data/spec/chewy_spec.rb +24 -107
  151. data/spec/spec_helper.rb +3 -22
  152. data/spec/support/active_record.rb +25 -7
  153. metadata +78 -339
  154. data/.circleci/config.yml +0 -240
  155. data/Appraisals +0 -81
  156. data/gemfiles/rails.5.2.activerecord.gemfile +0 -17
  157. data/gemfiles/rails.5.2.mongoid.6.4.gemfile +0 -17
  158. data/gemfiles/rails.6.0.activerecord.gemfile +0 -17
  159. data/gemfiles/sequel.4.45.gemfile +0 -11
  160. data/lib/chewy/backports/deep_dup.rb +0 -46
  161. data/lib/chewy/backports/duplicable.rb +0 -91
  162. data/lib/chewy/search/pagination/will_paginate.rb +0 -43
  163. data/lib/chewy/search/parameters/types.rb +0 -20
  164. data/lib/chewy/strategy/resque.rb +0 -27
  165. data/lib/chewy/strategy/shoryuken.rb +0 -40
  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/chewy/type/crutch.rb +0 -32
  170. data/lib/chewy/type/import/bulk_builder.rb +0 -122
  171. data/lib/chewy/type/observe.rb +0 -82
  172. data/lib/chewy/type.rb +0 -120
  173. data/lib/sequel/plugins/chewy_observe.rb +0 -63
  174. data/spec/chewy/search/pagination/will_paginate_examples.rb +0 -63
  175. data/spec/chewy/search/pagination/will_paginate_spec.rb +0 -23
  176. data/spec/chewy/search/parameters/types_spec.rb +0 -5
  177. data/spec/chewy/strategy/resque_spec.rb +0 -46
  178. data/spec/chewy/strategy/shoryuken_spec.rb +0 -70
  179. data/spec/chewy/type/actions_spec.rb +0 -50
  180. data/spec/chewy/type/adapter/mongoid_spec.rb +0 -372
  181. data/spec/chewy/type/adapter/sequel_spec.rb +0 -472
  182. data/spec/chewy/type/import/bulk_builder_spec.rb +0 -194
  183. data/spec/chewy/type/mapping_spec.rb +0 -175
  184. data/spec/chewy/type/observe_spec.rb +0 -137
  185. data/spec/chewy/type/wrapper_spec.rb +0 -100
  186. data/spec/chewy/type_spec.rb +0 -55
  187. data/spec/support/mongoid.rb +0 -93
  188. data/spec/support/sequel.rb +0 -80
data/CHANGELOG.md CHANGED
@@ -1,99 +1,382 @@
1
- # master
1
+ # Changelog
2
2
 
3
- # Version 6.0.0 (2021-02-11)
3
+ ## master (unreleased)
4
4
 
5
- ## Breaking changes
5
+ ### New Features
6
6
 
7
- * [#743](https://github.com/toptal/chewy/pull/743): Elasticsearch 6.x support added. See [migration guide](migration_guide.md) & ES [breaking changes](https://www.elastic.co/guide/en/elasticsearch/reference/6.8/breaking-changes-6.0.html). Removed legacy DSL support. Removed support for ES < 5 ([@mrzasa][], [@konalegi][], [@rabotyaga][])
7
+ ### Changes
8
8
 
9
- ## Bug fixes
9
+ ### Bugs Fixed
10
10
 
11
- * [#695](https://github.com/toptal/chewy/pull/695): Clear the scroll by id after completing scroll_batches ([@socialchorus][])
12
- * [#749](https://github.com/toptal/chewy/pull/749): Avoid importing everything when given an empty relation ([@JF-Lalonde][], [@dalthon][])
13
- * [#736](https://github.com/toptal/chewy/pull/736): Fix nil children when using witchcraft ([@taylor-au][])
11
+ ## 7.6.0 (2024-05-03)
14
12
 
15
- ## Changes
13
+ ### Changes
16
14
 
17
- * [#751](https://github.com/toptal/chewy/pull/751): Add [Multi Search API](https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-multi-search.html) support ([@mpeychich][], [@dalthon][])
18
- * [#755](https://github.com/toptal/chewy/pull/755): `attribute_highlights` returns an array of highlights ([@musaffa][], [@dalthon][])
19
- * [#753](https://github.com/toptal/chewy/pull/753): Add support for direct_import parameter to skip objects reloading ([@TikiTDO][], [@dalthon][])
20
- * [#739](https://github.com/toptal/chewy/pull/739): Remove explicit `main` branch dependencies on rspec* gems after `rspec-mocks` 3.10.2 is released ([@rabotyaga][])
15
+ * [#933](https://github.com/toptal/chewy/pull/933): Relax allowed `elasticsearch` dependency versions. ([@mjankowski][])
21
16
 
22
- # Version 5.2.0 (2021-01-28)
17
+ ### Bugs Fixed
18
+ * [#937](https://github.com/toptal/chewy/pull/937): Fix for race condition while using the `delayed_sidekiq` strategy. Also, fix for Redis bloating in case of reindexing error ([@skcc321](https://github.com/skcc321))
23
19
 
24
- ## Changes
20
+ * [#947](https://github.com/toptal/chewy/pull/947): Fix intermittent time-based failure in delayed sidekiq spec. ([@mjankowski][])
25
21
 
26
- * [#734](https://github.com/toptal/chewy/pull/734): Add support for Ruby 3 ([@lowang][])
27
- * [#735](https://github.com/toptal/chewy/pull/735): Correct deprecation warning for Elasticsearch 5.6 to 6: empty query for`_delete_by_query`, delete by alias, `index_already_exists_exception` renaming ([@bhacaz][])
28
- * [#733](https://github.com/toptal/chewy/pull/733): Update gemspec dependencies for Rails. Update CI gemfiles and matrix to tests against current LTS Rails versions. ([@bhacaz][])
29
- * Tweak some wording and formatting; add a note about compatibility; update copyright; remove broken logo; update the CI badge ([@bbatsov][])
30
- * [#714](https://github.com/toptal/chewy/pull/714): Update instructions for AWS ElasticSearch ([@olancheg][])
31
- * [#728](https://github.com/toptal/chewy/pull/728): Fix more ruby 2.7 keyword params deprecation warnings ([@aglushkov][])
32
- * [#715](https://github.com/toptal/chewy/pull/715): Fixed all deprecation warnings in Ruby 2.7 ([@gseddon][])
33
- * [#718](https://github.com/toptal/chewy/pull/718): Added Ruby 2.7 to CircleCI config ([@mrzasa][])
34
- * [#707](https://github.com/toptal/chewy/pull/707): Allow configuration of Active Job queue name ([@mrzasa][])
35
- * [#711](https://github.com/toptal/chewy/pull/711): Setup CI on CircleCI ([@mrzasa][])
36
- * [#710](https://github.com/toptal/chewy/pull/710): Fix deprecation warning for contructing new BigDecimal ([@AlexVPopov][])
22
+ ## 7.5.1 (2024-01-30)
23
+
24
+ ### New Features
25
+
26
+ * [#925](https://github.com/toptal/chewy/pull/925): Add configuration option for default scope cleanup behavior. ([@barthez][])
27
+
28
+ ### Changes
29
+
30
+ ### Bugs Fixed
31
+
32
+ ## 7.5.0 (2024-01-15)
33
+
34
+ ### New Features
35
+
36
+ * [#894](https://github.com/toptal/chewy/pull/894): Way of cleaning redis from artifacts left by `delayed_sidekiq` strategy which could potentially cause flaky tests. ([@Drowze](https://github.com/Drowze))
37
+ * [#919](https://github.com/toptal/chewy/pull/919): Add pre-request filter ([@konalegi][https://github.com/konalegi])
38
+
39
+ ## 7.4.0 (2023-12-13)
40
+
41
+ ### New Features
42
+
43
+ ### Changes
44
+
45
+ * [#911](https://github.com/toptal/chewy/pull/911): Remove ruby 2.x. ([@konalegi][https://github.com/konalegi])
46
+
47
+ ### Bugs Fixed
48
+
49
+ ## 7.3.6 (2023-12-13)
50
+
51
+ ### New Features
52
+
53
+ * [#890](https://github.com/toptal/chewy/pull/890): Add the [`knn`](https://www.elastic.co/guide/en/elasticsearch/reference/current/knn-search.html) option to the request. ([@jkostolansky][])
54
+
55
+ ### Changes
56
+
57
+ ### Bugs Fixed
58
+
59
+ ## 7.3.5 (2023-12-06)
60
+
61
+ ### New Features
62
+
63
+ * [#907](https://github.com/toptal/chewy/pull/907): Fix deprecation warning in LogSubscriber for Rails 7.1 ([@alejandroperea](https://github.com/alejandroperea))
64
+
65
+ ### Changes
66
+
67
+ ### Bugs Fixed
68
+
69
+ ## 7.3.4 (2023-08-29)
70
+
71
+ ### New Features
72
+
73
+ * [#888](https://github.com/toptal/chewy/pull/892): Rake task to create missing indexes ([@konalegi](https://github.com/konalegi))
74
+
75
+ ### Changes
76
+
77
+ ### Bugs Fixed
78
+
79
+ ## 7.3.3 (2023-07-07)
80
+
81
+ ### New Features
82
+
83
+ * [#888](https://github.com/toptal/chewy/pull/888/files): Skip journal creation on import ([@konalegi](https://github.com/konalegi))
84
+
85
+ ### Changes
86
+
87
+ ### Bugs Fixed
88
+
89
+ ## 7.3.2 (2023-04-20)
90
+
91
+ ### New Features
92
+
93
+ ### Changes
94
+
95
+ ### Bugs Fixed
96
+
97
+ * [#861](https://github.com/toptal/chewy/pull/861): Fix bug in mock_elasticsearch_response_sources ([@lafeber](https://github.com/lafeber))
98
+
99
+ ## 7.3.1 (2023-04-20)
100
+
101
+ ### Bugs Fixed
102
+
103
+ * [#874](https://github.com/toptal/chewy/pull/874): Fix `chewy:journal:clean` task for ruby 3.x. ([@muk-ai](https://github.com/muk-ai))
104
+ * [#882](https://github.com/toptal/chewy/pull/882): Fix memory leak during `chewy:reset` for ruby 3.2 ([@konalegi](https://github.com/konalegi))
105
+
106
+ ## 7.3.0 (2023-04-03)
107
+
108
+ ### New Features
109
+
110
+ * [#869](https://github.com/toptal/chewy/pull/869): New strategy - `delayed_sidekiq`. Allow passing `strategy: :delayed_sidekiq` option to `SomeIndex.import([1, ...], strategy: :delayed_sidekiq)`. The strategy is compatible with `update_fields` option as well. ([@skcc321][])
111
+ * [#879](https://github.com/toptal/chewy/pull/879): Configure CI to check for ruby 3.2 compatibility. ([@konalegi][])
112
+
113
+ ### Changes
114
+
115
+ ### Bugs Fixed
116
+
117
+ * [#856](https://github.com/toptal/chewy/pull/856): Fix return value of subscribed_task_stats used in rake tasks. ([@fabiormoura][])
118
+
119
+ ## 7.2.7 (2022-11-15)
120
+
121
+ ### New Features
122
+
123
+ * [#857](https://github.com/toptal/chewy/pull/857): Allow passing `wait_for_completion`, `request_per_second` and `scroll_size` options to `chewy:journal:clean` rake task and `delete_all` query builder method. ([@konalegi][])([@barthez][])
124
+
125
+ ### Changes
126
+
127
+ ### Bugs Fixed
37
128
 
38
- # Version 5.1.0 (2019-09-24)
129
+ * [#863](https://github.com/toptal/chewy/pull/863): Fix `crutches` call doesn't respect `update_fields` option. ([@skcc321][])
39
130
 
40
- ## Breaking changes
131
+ ## 7.2.6 (2022-06-13)
41
132
 
42
- * [#657](https://github.com/toptal/chewy/pull/657): Add support for multiple indices in request ([@pyromaniac][])
43
- * [#647](https://github.com/toptal/chewy/pull/647): Support `search_type`, `request_cache`, and `allow_partial_search_results` as query string parameters ([@mattzollinhofer][])
133
+ ### New Features
44
134
 
45
- ## Changes
135
+ * [#841](https://github.com/toptal/chewy/pull/841): Add the [`collapse`](https://www.elastic.co/guide/en/elasticsearch/reference/current/collapse-search-results.html) option to the request. ([@jkostolansky][])
46
136
 
47
- * [#606](https://github.com/toptal/chewy/pull/606): Speed up imports when `bulk_size` is specified ([@yahooguntu][])
48
- * [#682](https://github.com/toptal/chewy/pull/682): Insert `RequestStrategy` middleware before `ActionDispatch::ShowExceptions` ([@dck][])
137
+ ### Bugs Fixed
49
138
 
50
- # Version 5.0.0 (2018-02-13)
139
+ * [#842](https://github.com/toptal/chewy/issues/842): Fix `ignore_blank` handling. ([@rabotyaga][])
140
+ * [#848](https://github.com/toptal/chewy/issues/848): Fix invalid journal pagination. ([@konalegi][])
51
141
 
52
- ## Breaking changes
142
+ ## 7.2.5 (2022-03-04)
53
143
 
54
- * Try to align the gem version with the ElasticSearch version we support
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][])
144
+ ### New Features
59
145
 
60
- ## Changes
146
+ * [#827](https://github.com/toptal/chewy/pull/827): Add `:lazy_sidekiq` strategy, that defers not only importing but also `update_index` callback evaluation for created and updated objects. ([@sl4vr][])
147
+ * [#827](https://github.com/toptal/chewy/pull/827): Add `:atomic_no_refresh` strategy. Like `:atomic`, but `refresh=false` parameter is set. ([@barthez][])
148
+ * [#827](https://github.com/toptal/chewy/pull/827): Add `:no_refresh` chain call to `update_index` matcher to ensure import was called with `refresh=false`. ([@barthez][])
61
149
 
62
- * [#598](https://github.com/toptal/chewy/pull/598): `pipeline` import option support ([@eManPrague][])
63
- * [#625](https://github.com/toptal/chewy/pull/625): Proper Rails check ([@nattfodd][])
64
- * [#623](https://github.com/toptal/chewy/pull/623): Bypass strategy performance improvements ([@DNNX][])
65
- * [#620](https://github.com/toptal/chewy/pull/620): Avoid index update calls for empty data ([@robertasg][])
150
+ ### Bugs Fixed
151
+
152
+ * [#835](https://github.com/toptal/chewy/pull/835): Support keyword arguments in named scopes. ([@milk1000cc][])
153
+
154
+ ## 7.2.4 (2022-02-03)
155
+
156
+ ### New Features
157
+
158
+ * [#760](https://github.com/toptal/chewy/pull/760): Replace parent-child mapping with a [join field](https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html#parent-child-mapping-types) ([@mrzasa][])
159
+
160
+ ### Bugs Fixed
161
+
162
+ * [#825](https://github.com/toptal/chewy/issues/825): Fix mismatch argument names at update_mapping rake task ([@AgeevAndrew][])
163
+ * [#832](https://github.com/toptal/chewy/issues/832): Fix "cannot load such file -- `i18n/core_ext/hash`" ([@chrisandreae][])
164
+
165
+ ## 7.2.3 (2021-10-29)
166
+
167
+ ### New Features
168
+
169
+ * [#801](https://github.com/toptal/chewy/pull/801): Add the [`track_total_hits`](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-your-data.html#track-total-hits) option to the query. ([@milk1000cc][])
170
+ * [#810](https://github.com/toptal/chewy/pull/810): Use `unsafe_load` when loading config to support Psych 4.
171
+ * [#819](https://github.com/toptal/chewy/pull/819): Add the [`ignore_unavailable`](https://www.elastic.co/guide/en/elasticsearch/reference/current/multi-index.html#multi-index) option to the request. ([@kolauren][])
172
+
173
+ ### Changes
174
+
175
+ * [#817](https://github.com/toptal/chewy/pull/817): Show warning message during rake chewy:reset or chewy:upgrade if journaling is disabled. ([@konalegi][])
176
+
177
+ ### Bugs Fixed
178
+
179
+ * [#816](https://github.com/toptal/chewy/pull/816): Move query [`preference`](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/search-search.html#search-preference) from body to query parameters. ([@afg419][])
180
+
181
+ ## 7.2.2 (2021-05-24)
182
+
183
+ ### Changes
184
+
185
+ * [#800](https://github.com/toptal/chewy/pull/800): Revert [#787](https://github.com/toptal/chewy/pull/787) progressbar feature to avoid performance degradation in parallel import ([@rabotyaga][])
186
+
187
+ * [#795](https://github.com/toptal/chewy/issues/795): **(Breaking)** Change the Chewy::Search::Parameters::Order implementation to use Array ([@jiajiawang][]):
188
+ * To allow multiple sorting options that may have the same key name. For example script based sorting whose key will always be `_script`.
189
+ * Behaviour change of chained `order` calls.
190
+ * e.g. `.order(_script: {a: 1}).order(_script: {b: 2})`
191
+ * Before `{:sort=>[{"_script"=>{:b=>2}}]}`
192
+ * After `{:sort=>[{"_script"=>{:a=>1}},{"_script"=>{:b=>2}}]}`
193
+
194
+ * [#654](https://github.com/toptal/chewy/issues/654): Add helpers and matchers for testing ([@Vitalina-Vakulchyk][]):
195
+ * `mock_elasticsearch_response` helpers both Rspec and Minitest - to mock elasticsearch response
196
+ * `mock_elasticsearch_response_sources` helpers both Rspec and Minitest - to mock elasticsearch response sources
197
+ * `assert_elasticsearch_query` helper for Minitest - to compare request and expected query (returns `true`/`false`)
198
+ * `build_query` matcher for Rspec - to compare request and expected query (returns `true`/`false`)
199
+
200
+ ## 7.2.1 (2021-05-11)
201
+
202
+ ### New Features
203
+
204
+ * [#469](https://github.com/toptal/chewy/issues/469): Add ability to output the progressbar with `ENV['PROGRESS']` during `reset` rake tasks ([@Vitalina-Vakulchyk][]):
205
+ * for `rake chewy:reset` and `rake chewy:parallel:reset`
206
+ * progressbar is hidden by default, set `ENV['PROGRESS']` to `true` to display it
207
+
208
+ ### Bugs Fixed
209
+
210
+ * [#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][])
211
+
212
+ ## 7.0.1 (2021-05-03)
213
+
214
+ ### Changes
215
+
216
+ * [#792](https://github.com/toptal/chewy/pull/792): Skip ES version memoization for search requests ([@rabotyaga][])
217
+ * See the Migration Guide for details
218
+
219
+ ## 7.2.0 (2021-04-19)
220
+
221
+ ### New Features
222
+
223
+ * [#778](https://github.com/toptal/chewy/pull/778): Add `ignore_blank` option to `field` method ([@Vitalina-Vakulchyk][]):
224
+ * `true` by default for the `geo_point` type
225
+ * `false` by default for other types
226
+
227
+ ### Changes
228
+
229
+ * [#783](https://github.com/toptal/chewy/pull/783): **(Breaking)** Remove `Chewy::Type`, simplify DSL ([@rabotyaga][])
230
+ * Remove the `Chewy::Type` class
231
+ * e.g. remove `CitiesIndex::City` / `CitiesIndex.city`
232
+ * `CitiesIndex::City.import! ...` becomes `CitiesIndex.import! ...`
233
+ * Simplify index DSL:
234
+ * `define_type` block -> `index_scope` clause
235
+ * it can be omitted completely, if you don't need to specify the scope or options, e.g. `name`
236
+ * Remove type names from string representations:
237
+ * in `update_index` ActiveRecord helper and RSpec matcher, e.g.
238
+ * `update_index('cities#city')` -> `update_index('cities')`
239
+ * `update_index(UsersIndex::User)` -> `update_index(UsersIndex)`
240
+ * in rake tasks (e.g. `rake chewy:update[cities#city]` -> `rake chewy:update[cities]`)
241
+ * in rake tasks output (e.g. `Imported CitiesIndex::City in 1s, stats: index 3` -> `Imported CitiesIndex in 1s, stats: index 3`)
242
+ * Use index name instead of type name in loader additional scope
243
+ * e.g. `CitiesIndex.filter(...).load(city: {scope: City.where(...)})` -> `CitiesIndex.filter(...).load(cities: {scope: City.where(...)})`
244
+ * [#692](https://github.com/toptal/chewy/issues/692): Add `.update_mapping` to Index class ([@Vitalina-Vakulchyk][]):
245
+ * Wrapped Elasticsearch gem `.put_mapping` with `.update_mapping` in Index class
246
+ * Add `rake chewy:update_mapping` task
247
+ * [#594](https://github.com/toptal/chewy/issues/594): Add `.reindex` to Index class ([@Vitalina-Vakulchyk][]):
248
+ * Wrapped Elasticsearch gem `.reindex` with `.reindex` in Index class
249
+ * Add `rake chewy:reindex` task
250
+ * [#679](https://github.com/toptal/chewy/issues/679): Wrapped `Elasticsearch::API::Indices::Actions#clear_cache` with `.clear_cache` in Index class ([@Vitalina-Vakulchyk][])
251
+ * [#495](https://github.com/toptal/chewy/issues/495): Ability to change Rails console strategy with `Chewy.console_strategy` ([@Vitalina-Vakulchyk][])
252
+ * [#778](https://github.com/toptal/chewy/pull/778): **(Breaking)** Drop support for Ruby 2.5 ([@Vitalina-Vakulchyk][])
253
+ * [#776](https://github.com/toptal/chewy/pull/776): **(Breaking)** Removal of unnecessary features and integrations ([@Vitalina-Vakulchyk][]):
254
+ * `aws-sdk-sqs` / `shoryuken`
255
+ * `mongoid`
256
+ * `sequel`
257
+ * `will_paginate`
258
+ * `resque`
259
+ * [#769](https://github.com/toptal/chewy/pull/769): **(Breaking)** Removal of deprecated methods and rake tasks ([@Vitalina-Vakulchyk][]):
260
+ * `Chewy::Index.index_params` is removed, use `Chewy::Index.specification_hash` instead
261
+ * `Chewy::Index.derivable_index_name` is removed, use `Chewy::Index.derivable_name` instead
262
+ * `Chewy::Index.default_prefix` is removed, use `Chewy::Index.prefix` instead
263
+ * `Chewy::Index.build_index_name` is removed, use `Chewy::Index.index_name` instead
264
+ * `Chewy::RakeHelper.reset_index` is removed, use `Chewy::RakeHelper.reset` instead
265
+ * `Chewy::RakeHelper.reset_all` is removed, use `Chewy::RakeHelper.reset` instead
266
+ * `Chewy::RakeHelper.update_index` is removed, use `Chewy::RakeHelper.update` instead
267
+ * `Chewy::RakeHelper.update_all` is removed, use `Chewy::RakeHelper.update` instead
268
+ * `rake chewy:apply_changes_from` is removed, use `rake chewy:journal:apply` instead
269
+ * `rake chewy:clean_journal` is removed, use `rake chewy:journal:clean` instead
270
+
271
+ ## 7.1.0 (2021-03-03)
272
+
273
+ ### Changes
274
+
275
+ * [#766](https://github.com/toptal/chewy/pull/766): **(Breaking)** Drop support for Elasticsearch 6.x ([@rabotyaga][])
276
+ * [#765](https://github.com/toptal/chewy/pull/765): Fix ruby 2.7 warnings in rake tasks ([@aglushkov][])
277
+
278
+ ### Bugs Fixed
279
+
280
+ * [#722](https://github.com/toptal/chewy/issues/722): Remove alias_method_chain, use Module#prepend instead ([@dalthon][])
281
+
282
+ ## 7.0.0 (2021-02-22)
283
+
284
+ ### New Features
285
+
286
+ * [#763](https://github.com/toptal/chewy/pull/763): Added support for Elasticsearch 7 ([@rabotyaga][])
287
+
288
+ ### Changes
289
+
290
+ * [#757](https://github.com/toptal/chewy/pull/757): **(Breaking)** Fix `Chewy::Index.index` & `Chewy::Index.aliases` to correctly report indexes and aliases ([@mpeychich][], [@dalthon][])
291
+ * [#761](https://github.com/toptal/chewy/pull/761): Avoid fetching scope data to check if it is blank ([@dalthon][])
292
+
293
+ ## 6.0.0 (2021-02-11)
294
+
295
+ ### Changes
296
+
297
+ * [#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][])
298
+ * [#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][])
299
+ * [#755](https://github.com/toptal/chewy/pull/755): `attribute_highlights` returns an array of highlights. ([@musaffa][], [@dalthon][])
300
+ * [#753](https://github.com/toptal/chewy/pull/753): Add support for direct_import parameter to skip objects reloading. ([@TikiTDO][], [@dalthon][])
301
+ * [#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][])
302
+
303
+ ### Bugs Fixed
304
+
305
+ * [#695](https://github.com/toptal/chewy/pull/695): Clear the scroll by id after completing `scroll_batches`. ([@socialchorus][])
306
+ * [#749](https://github.com/toptal/chewy/pull/749): Avoid importing everything when given an empty relation. ([@JF-Lalonde][], [@dalthon][])
307
+ * [#736](https://github.com/toptal/chewy/pull/736): Fix nil children when using witchcraft. ([@taylor-au][])
308
+
309
+ ## 5.2.0 (2021-01-28)
310
+
311
+ ### Changes
312
+
313
+ * [#734](https://github.com/toptal/chewy/pull/734): Add support for Ruby 3. ([@lowang][])
314
+ * [#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][])
315
+ * [#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][])
316
+ * Tweak some wording and formatting; add a note about compatibility; update copyright; remove broken logo; update the CI badge. ([@bbatsov][])
317
+ * [#714](https://github.com/toptal/chewy/pull/714): Update instructions for AWS ElasticSearch. ([@olancheg][])
318
+ * [#728](https://github.com/toptal/chewy/pull/728): Fix more ruby 2.7 keyword params deprecation warnings. ([@aglushkov][])
319
+ * [#715](https://github.com/toptal/chewy/pull/715): Fixed all deprecation warnings in Ruby 2.7. ([@gseddon][])
320
+ * [#718](https://github.com/toptal/chewy/pull/718): Added Ruby 2.7 to CircleCI config. ([@mrzasa][])
321
+ * [#707](https://github.com/toptal/chewy/pull/707): Allow configuration of Active Job queue name. ([@mrzasa][])
322
+ * [#711](https://github.com/toptal/chewy/pull/711): Setup CI on CircleCI. ([@mrzasa][])
323
+ * [#710](https://github.com/toptal/chewy/pull/710): Fix deprecation warning for constructing new `BigDecimal`. ([@AlexVPopov][])
324
+
325
+ ## 5.1.0 (2019-09-24)
326
+
327
+ ### Changes
328
+
329
+ * [#657](https://github.com/toptal/chewy/pull/657): **(Breaking)** Add support for multiple indices in request. ([@pyromaniac][])
330
+ * [#647](https://github.com/toptal/chewy/pull/647): **(Breaking)** Support `search_type`, `request_cache`, and `allow_partial_search_results` as query string parameters. ([@mattzollinhofer][])
331
+ * [#606](https://github.com/toptal/chewy/pull/606): Speed up imports when `bulk_size` is specified. ([@yahooguntu][])
332
+ * [#682](https://github.com/toptal/chewy/pull/682): Insert `RequestStrategy` middleware before `ActionDispatch::ShowExceptions`. ([@dck][])
333
+
334
+ ## 5.0.0 (2018-02-13)
335
+
336
+ ### Changes
337
+
338
+ * **(Breaking)** Align the gem version with the most recent ElasticSearch version we support.
339
+ * **(Breaking)** `Chewy.default_field_type` is `text` now.
340
+ * **(Breaking)** `Chewy::Stash` was split onto two indexes - `Chewy::Stash::Specification` and `Chewy::Stash::Journal`.
341
+ * **(Breaking)** Data for journal and specification is stored in binary fields base64-encoded to bypass the limits of other fields.
342
+ * **(Breaking)** [#626](https://github.com/toptal/chewy/pull/626): Don't underscore suggested index name. ([@dm1try][])
343
+ * [#598](https://github.com/toptal/chewy/pull/598): `pipeline` import option support. ([@eManPrague][])
344
+ * [#625](https://github.com/toptal/chewy/pull/625): Proper Rails check. ([@nattfodd][])
345
+ * [#623](https://github.com/toptal/chewy/pull/623): Bypass strategy performance improvements. ([@DNNX][])
346
+ * [#620](https://github.com/toptal/chewy/pull/620): Avoid index update calls for empty data. ([@robertasg][])
66
347
  * Do not underscore suggested index name on `Chewy::Index.index_name` call.
67
348
  * 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][])
349
+ * [#565](https://github.com/toptal/chewy/pull/565): Fixed some Sequel deprecation warnings. ([@arturtr][])
350
+ * [#577](https://github.com/toptal/chewy/pull/577): Fixed some Sequel deprecation warnings. ([@matchbookmac][])
351
+
352
+ ### Bugs Fixed
70
353
 
71
- ## Bugfixes
354
+ * [#593](https://github.com/toptal/chewy/pull/593): Fixed index settings logic error. ([@yahooguntu][])
355
+ * [#567](https://github.com/toptal/chewy/pull/567): Missed check in higlight method. ([@heartfulbird][])
72
356
 
73
- * [#593](https://github.com/toptal/chewy/pull/593): Fixed index settings logic error ([@yahooguntu][])
74
- * [#567](https://github.com/toptal/chewy/pull/567): Missed check in higlight method ([@heartfulbird][])
357
+ -----------------------------------------------------------------------------------
75
358
 
76
- # Version 0.10.1
359
+ ## 0.10.1
77
360
 
78
- ## Changes
361
+ ### Changes
79
362
 
80
363
  * [#558](https://github.com/toptal/chewy/pull/558): Improved parallel worker titles
81
364
 
82
- ## Bugfixes
365
+ ### Bugs Fixed
83
366
 
84
367
  * [#557](https://github.com/toptal/chewy/pull/557): Fixed request strategy initial debug message
85
368
  * [#556](https://github.com/toptal/chewy/pull/556): Fixed will objects paginated array initialization when pagination was not used
86
369
  * [#555](https://github.com/toptal/chewy/pull/555): Fixed fields symbol/string value
87
370
  * [#554](https://github.com/toptal/chewy/pull/554): Fixed root field value proc
88
371
 
89
- # Version 0.10.0
372
+ ## 0.10.0
90
373
 
91
- ## Breaking changes
374
+ ### Breaking changes
92
375
 
93
376
  * Changed behavior of `Chewy::Index.index_name`, it doesn't cache the values anymore.
94
377
  * Journal interfaces, related code and rake tasks were completely refactored and are not compatible with the previous version.
95
378
 
96
- ## Changes
379
+ ### Changes
97
380
 
98
381
  * [#543](https://github.com/toptal/chewy/pull/543): Less noisy strategies logging ([@Borzik][])
99
382
  * Parallel import and the corresponding rake tasks.
@@ -116,9 +399,9 @@
116
399
  * [#467](https://github.com/toptal/chewy/pull/467): Bulk indexing optimizations with new additional options ([@eproulx-petalmd][])
117
400
  * [#438](https://github.com/toptal/chewy/pull/438): Configurable sidekiq options ([@averell23][])
118
401
 
119
- # Version 0.9.0
402
+ ## 0.9.0
120
403
 
121
- ## Changes
404
+ ### Changes
122
405
 
123
406
  * [#443](https://github.com/toptal/chewy/pull/443): Add `preference` param to Query ([@menglewis][])
124
407
  * [#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 +417,16 @@
134
417
  * Witchcraft™ supports dynamically generated procs with variables from closure.
135
418
  * Added `Query#preference` for specifying shard replicas to query against. ([@menglewis][])
136
419
 
137
- ## Bugfixes
420
+ ### Bugs Fixed
138
421
 
139
422
  * [#415](https://github.com/toptal/chewy/pull/415): `.script_fields` method in the Index class ([@dmitry][])
140
423
  * [#398](https://github.com/toptal/chewy/pull/398): Fix routing_missing_exception on delete with parent missing ([@guigs][])
141
424
  * [#385](https://github.com/toptal/chewy/pull/385): Sequel custom primary keys handling fix ([@okliv][])
142
425
  * [#374](https://github.com/toptal/chewy/pull/374): Bulk import fixes ([@0x0badc0de][])
143
426
 
144
- # Version 0.8.4
427
+ ## 0.8.4
145
428
 
146
- ## Changes
429
+ ### Changes
147
430
 
148
431
  * Brand new import `:bulk_size` option, set desired ElasticSearch bulk size in bytes
149
432
  * Witchcraft™ technology
@@ -159,7 +442,7 @@
159
442
  * Accessing types with methods is deprecated. Use `MyIndex::MyType` constant reference instead of `MyIndex.my_type` method.
160
443
  * [#294](https://github.com/toptal/chewy/pull/294): Sequel adapter improvements ([@mrbrdo][])
161
444
 
162
- ## Bugfixes
445
+ ### Bugs Fixed
163
446
 
164
447
  * [#325](https://github.com/toptal/chewy/pull/325): Mongoid atomic strategy fix
165
448
  * [#324](https://github.com/toptal/chewy/pull/324): Method missing fix ([@jesjos][])
@@ -167,18 +450,18 @@
167
450
  * [#306](https://github.com/toptal/chewy/pull/306): Better errors handling in strategies ([@barthez][])
168
451
  * [#303](https://github.com/toptal/chewy/pull/303): Assets strategies silencer fix for Rails 5 API mode ([@clupprich][])
169
452
 
170
- # Version 0.8.3
453
+ ## 0.8.3
171
454
 
172
- ## Breaking changes:
455
+ ### Breaking changes:
173
456
 
174
457
  * `Chewy.atomic` and `Chewy.urgent_update=` methods was removed from the codebase, use `Chewy.strategy` block instead.
175
458
  * `delete_from_index?` hook is removed from the codebase.
176
459
 
177
- ## Changes
460
+ ### Changes
178
461
 
179
462
  * Sequel support completely reworked to use common ORM implementations + better sequel specs covarage.
180
463
 
181
- ## Bugfixes
464
+ ### Bugs Fixed
182
465
 
183
466
  * Sequel objects transactional destruction fix
184
467
  * Correct Rspec mocking framework checking ([@mainameiz][])
@@ -186,9 +469,9 @@
186
469
  * Safe unsubscribe on import ([@marshall-lee][])
187
470
  * Correct custom assets path silencer ([@davekaro][])
188
471
 
189
- # Version 0.8.2
472
+ ## 0.8.2
190
473
 
191
- ## Changes
474
+ ### Changes
192
475
 
193
476
  * ActiveJob strategy by [@mkcode][]
194
477
  * Async strategies tweak ([@AndreySavelyev][])
@@ -200,23 +483,23 @@
200
483
  * Multiple grammar fixes ([@henrebotha][])
201
484
  * Ability to pass a proc to `update_index` to define updating index dynamically ([@SeTeM][])
202
485
 
203
- ## Bugfixes
486
+ ### Bugs Fixed
204
487
 
205
488
  * Fixed transport logger and tracer configuration
206
489
 
207
- # Version 0.8.1
490
+ ## 0.8.1
208
491
 
209
- ## Bugfixes
492
+ ### Bugs Fixed
210
493
 
211
494
  * Added support of elasticsearch-ruby 1.0.10
212
495
 
213
- # Version 0.8.0
496
+ ## 0.8.0
214
497
 
215
- ## Breaking changes:
498
+ ### Breaking changes:
216
499
 
217
500
  * `:atomic` and `:urgent` strategies are using `import!` method raising exceptions
218
501
 
219
- ## Changes
502
+ ### Changes
220
503
 
221
504
  * Crutches™ technology
222
505
  * Added `.script_fields` chainable method to query ([@ka8725][])
@@ -225,14 +508,14 @@
225
508
  * `:sidekiq` async strategy (inspired by [@sharkzp][])
226
509
  * Added `Query#search_type` for `search_type` request option setup ([@marshall-lee][])
227
510
 
228
- ## Bugfixes
511
+ ### Bugs Fixed
229
512
 
230
513
  * Rails 4.2 migrations are not raising UndefinedUpdateStrategy anymore on data updates
231
514
  * Mongoid random failing specs fixes ([@marshall-lee][])
232
515
 
233
- # Version 0.7.0
516
+ ## 0.7.0
234
517
 
235
- ## Breaking changes:
518
+ ### Breaking changes:
236
519
 
237
520
  * `Chewy.use_after_commit_callbacks = false` returns previous RDBMS behavior in tests
238
521
  * ActiveRecord import is now called after_commit instead of after_save and after_destroy
@@ -265,7 +548,7 @@
265
548
  end
266
549
  ```
267
550
 
268
- ## Changes
551
+ ### Changes
269
552
 
270
553
  * Multiple enhancements by [@DNNX][]
271
554
  * Added `script_fields` to search criteria ([@ka8725][])
@@ -306,61 +589,61 @@
306
589
  ```
307
590
  * Implemented basic named scopes
308
591
 
309
- ## Bugfixes
592
+ ### Bugs Fixed
310
593
 
311
594
  * `script_score` allow options ([@joeljunstrom][])
312
595
  * Chewy indexes eaged loading fixes ([@leemhenson][])
313
596
  * `Chewy::Index.import nil` imports nothing instead of initial data
314
597
 
315
- # Version 0.6.2
598
+ ## 0.6.2
316
599
 
317
- ## Changes
600
+ ### Changes
318
601
 
319
602
  * document root id custom value option ([@baronworks][])
320
603
 
321
- ## Bugfixes
604
+ ### Bugs Fixed
322
605
 
323
606
  * Removed decay function defaults ([@Linuus][])
324
607
  * Correct config file handling in case of empty file
325
608
 
326
- # Version 0.6.1
609
+ ## 0.6.1
327
610
 
328
- ## Changes
611
+ ### Changes
329
612
 
330
613
  * `min_score` query option support ([@jshirley][])
331
614
  * `Chewy::Query#find` method for finding documents by id
332
615
 
333
- # Version 0.6.0
616
+ ## 0.6.0
334
617
 
335
- ## Changes
618
+ ### Changes
336
619
 
337
620
  * Mongoid support YaY! ([@fabiotomio][], [@leemhenson][])
338
621
  * `urgent: true` option for `update_index` is deprecated and will be removed soon, use `Chewy.atomic` instead
339
622
  * `timeout` and `timed_out` support ([@MarkMurphy][])
340
623
  * will_paginate support ([@josecoelho][])
341
624
 
342
- ## Bugfixes
625
+ ### Bugs Fixed
343
626
 
344
627
  * All the query chainable methods delegated to indexes and types (partially [@Linuus][])
345
628
 
346
- # Version 0.5.2
629
+ ## 0.5.2
347
630
 
348
- ## Breaking changes:
631
+ ### Breaking changes:
349
632
 
350
633
  * `Chewy::Type::Base` removed in favour of using `Chewy::Type` as a base class for all types
351
634
 
352
- ## Changes
635
+ ### Changes
353
636
 
354
637
  * `Chewy.massacre` aliased to `Chewy.delete_all` method deletes all the indexes with current prefix
355
638
 
356
- ## Bugfixes:
639
+ ### Bugs Fixed:
357
640
 
358
641
  * Advanced type classes resolving ([@inbeom][])
359
642
  * `import` ignores nil
360
643
 
361
- # Version 0.5.1
644
+ ## 0.5.1
362
645
 
363
- ## Changes:
646
+ ### Changes:
364
647
 
365
648
  * `chewy.yml` Rails generator ([@jirikolarik][])
366
649
  * Parent-child mappings feature support ([@inbeom][])
@@ -370,20 +653,20 @@
370
653
  * Rspec 3 `update_index` matcher support ([@jimmybaker][])
371
654
  * Implemented function scoring ([@averell23][])
372
655
 
373
- ## Bugfixes:
656
+ ### Bugs Fixed:
374
657
 
375
658
  * Indexed eager-loading fix ([@leemhenson][])
376
659
  * Field type deriving nested type support fix ([@rschellhorn][])
377
660
 
378
- # Version 0.5.0
661
+ ## 0.5.0
379
662
 
380
- ## Breaking changes:
663
+ ### Breaking changes:
381
664
 
382
665
  * 404 exception (IndexMissingException) while query is swallowed and treated like an empty result set.
383
666
  * `load` and `preload` for queries became lazy. Might be partially incompatible.
384
667
  * 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
668
 
386
- ## Changes:
669
+ ### Changes:
387
670
 
388
671
  * `suggest` query options support ([@rschellhorn][]).
389
672
  * Added hash data support. How it is possible to pass hashes to import.
@@ -397,7 +680,7 @@
397
680
  * `highlight` and `rescore` query options support.
398
681
  * config/chewy.yml ERB support.
399
682
 
400
- ## Bugfixes:
683
+ ### Bugs Fixed:
401
684
 
402
685
  * Fixed `missing` and `exists` filters DSL constructors.
403
686
  * Reworked index data composing.
@@ -405,7 +688,7 @@
405
688
  * Correct waiting for status. After index creation, bulk import, and deletion.
406
689
  * [#23](https://github.com/toptal/chewy/pull/23): Fix "wrong constant name" with namespace models
407
690
 
408
- # Version 0.4.0
691
+ ## 0.4.0
409
692
 
410
693
  * Changed `update_index` matcher behavior. Now it compare array attributes position-independently.
411
694
  * Search aggregations API support ([@arion][]).
@@ -416,18 +699,18 @@
416
699
  * `import` now creates index before performing.
417
700
  * `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
701
 
419
- # Version 0.3.0
702
+ ## 0.3.0
420
703
 
421
704
  * Added `Chewy.configuration[:index]` config to setup common indexes options.
422
705
  * `Chewy.client_options` replaced with `Chewy.configuration`
423
706
  * Using source filtering instead of fields filter (http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-source-filtering.html).
424
707
 
425
- # Version 0.2.3
708
+ ## 0.2.3
426
709
 
427
710
  * `.import!` indexes method, raises import errors.
428
711
  * `.import!` types method, raises import errors. Useful for specs.
429
712
 
430
- # Version 0.2.2
713
+ ## 0.2.2
431
714
 
432
715
  * Support for `none` scope ([@undr][]).
433
716
  * Auto-resolved analyzers and analyzers repository ([@webgago][]):
@@ -443,7 +726,7 @@
443
726
  ```
444
727
  `title_analyzer` here will be automatically resolved and passed to index mapping
445
728
 
446
- # Version 0.2.0
729
+ ## 0.2.0
447
730
 
448
731
  * 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
732
  * `Chewy::Index.import` now takes types hash as argument within options hash:
@@ -461,7 +744,7 @@
461
744
  `CitiesIndex.all.load(scope: {city: -> { include(:country) }})`
462
745
  `CitiesIndex.all.load(scope: ->{ include(:country) })`
463
746
 
464
- # Version 0.1.0
747
+ ## 0.1.0
465
748
 
466
749
  * Added filters simplified DSL. See [filters.rb](lib/chewy/query/filters.rb) for more details.
467
750
  * Queries and filters join system reworked. See [query.rb](lib/chewy/query.rb) for more details.
@@ -498,16 +781,18 @@
498
781
  * Implemented isolated adapters to simplify adding new ORMs
499
782
  * Query DLS chainable methods delegated to index class (no longer need to call MyIndex.search.query, just MyIndex.query)
500
783
 
501
- # Version 0.0.1
784
+ ## 0.0.1
502
785
 
503
786
  * Query DSL
504
787
  * Basic index handling
505
788
  * Initial version
506
789
 
507
790
  [@0x0badc0de]: https://github.com/0x0badc0de
791
+ [@AgeevAndrew]: https://github.com/AgeevAndrew
508
792
  [@aglushkov]: https://github.com/aglushkov
509
793
  [@AlexVPopov]: https://github.com/AlexVPopov
510
794
  [@AndreySavelyev]: https://github.com/AndreySavelyev
795
+ [@afg419]: https://github.com/afg419
511
796
  [@arion]: https://github.com/arion
512
797
  [@arturtr]: https://github.com/arturtr
513
798
  [@averell23]: https://github.com/averell23
@@ -518,6 +803,7 @@
518
803
  [@biow0lf]: https://github.com/biow0lf
519
804
  [@Borzik]: https://github.com/Borzik
520
805
  [@caldwecr]: https://github.com/caldwecr
806
+ [@chrisandreae]: https://github.com/chrisandreae
521
807
  [@clupprich]: https://github.com/clupprich
522
808
  [@dalthon]: https://github.com/dalthon
523
809
  [@davekaro]: https://github.com/davekaro
@@ -537,9 +823,11 @@
537
823
  [@inbeom]: https://github.com/inbeom
538
824
  [@jesjos]: https://github.com/jesjos
539
825
  [@JF-Lalonde]: https://github.com/JF-Lalonde
826
+ [@jiajiawang]: https://github.com/jiajiawang
540
827
  [@jimmybaker]: https://github.com/jimmybaker
541
828
  [@jirikolarik]: https://github.com/jirikolarik
542
829
  [@jirutka]: https://github.com/jirutka
830
+ [@jkostolansky]: https://github.com/jkostolansky
543
831
  [@joeljunstrom]: https://github.com/joeljunstrom
544
832
  [@jondavidford]: https://github.com/jondavidford
545
833
  [@joonty]: https://github.com/joonty
@@ -547,6 +835,7 @@
547
835
  [@josephchoe]: https://github.com/josephchoe
548
836
  [@jshirley]: https://github.com/jshirley
549
837
  [@ka8725]: https://github.com/ka8725
838
+ [@kolauren]: https://github.com/kolauren
550
839
  [@konalegi]: https://github.com/konalegi
551
840
  [@lardawge]: https://github.com/lardawge
552
841
  [@leemhenson]: https://github.com/leemhenson
@@ -560,6 +849,7 @@
560
849
  [@mattzollinhofer]: https://github.com/mattzollinhofer
561
850
  [@menglewis]: https://github.com/menglewis
562
851
  [@mikeyhogarth]: https://github.com/mikeyhogarth
852
+ [@milk1000cc]: https://github.com/milk1000cc
563
853
  [@mkcode]: https://github.com/mkcode
564
854
  [@mpeychich]: https://github.com/mpeychich
565
855
  [@mrbrdo]: https://github.com/mrbrdo
@@ -584,5 +874,6 @@
584
874
  [@taylor-au]: https://github.com/taylor-au
585
875
  [@TikiTDO]: https://github.com/TikiTDO
586
876
  [@undr]: https://github.com/undr
877
+ [@Vitalina-Vakulchyk]: https://github.com/Vitalina-Vakulchyk
587
878
  [@webgago]: https://github.com/webgago
588
879
  [@yahooguntu]: https://github.com/yahooguntu