chewy 5.0.0 → 7.0.1

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