chewy 0.10.1 → 7.0.0

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