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
@@ -3,8 +3,10 @@ require 'spec_helper'
3
3
  describe Chewy::Type::Import::JournalBuilder, :orm do
4
4
  before do
5
5
  stub_model(:country)
6
- stub_index 'namespace/places' do
6
+ stub_index 'namespace/cities' do
7
7
  define_type :city
8
+ end
9
+ stub_index 'namespace/countries' do
8
10
  define_type Country
9
11
  end
10
12
  Timecop.freeze(time)
@@ -13,7 +15,7 @@ describe Chewy::Type::Import::JournalBuilder, :orm do
13
15
 
14
16
  let(:time) { Time.parse('2017-07-14 12:00Z') }
15
17
 
16
- let(:type) { Namespace::PlacesIndex::City }
18
+ let(:type) { Namespace::CitiesIndex::City }
17
19
  let(:index) { [] }
18
20
  let(:delete) { [] }
19
21
  subject { described_class.new(type, index: index, delete: delete) }
@@ -29,7 +31,7 @@ describe Chewy::Type::Import::JournalBuilder, :orm do
29
31
  _index: 'chewy_journal',
30
32
  _type: 'journal',
31
33
  data: {
32
- 'index_name' => 'namespace/places',
34
+ 'index_name' => 'namespace/cities',
33
35
  'type_name' => 'city',
34
36
  'action' => 'index',
35
37
  'references' => [Base64.encode64('{"id":1,"name":"City"}')],
@@ -48,7 +50,7 @@ describe Chewy::Type::Import::JournalBuilder, :orm do
48
50
  _index: 'chewy_journal',
49
51
  _type: 'journal',
50
52
  data: {
51
- 'index_name' => 'namespace/places',
53
+ 'index_name' => 'namespace/cities',
52
54
  'type_name' => 'city',
53
55
  'action' => 'delete',
54
56
  'references' => [Base64.encode64('{"id":1,"name":"City"}')],
@@ -60,7 +62,7 @@ describe Chewy::Type::Import::JournalBuilder, :orm do
60
62
  end
61
63
 
62
64
  context do
63
- let(:type) { Namespace::PlacesIndex::Country }
65
+ let(:type) { Namespace::CountriesIndex::Country }
64
66
  let(:index) { [Country.new(id: 1, name: 'City')] }
65
67
  let(:delete) { [Country.new(id: 2, name: 'City')] }
66
68
  specify do
@@ -69,7 +71,7 @@ describe Chewy::Type::Import::JournalBuilder, :orm do
69
71
  _index: 'chewy_journal',
70
72
  _type: 'journal',
71
73
  data: {
72
- 'index_name' => 'namespace/places',
74
+ 'index_name' => 'namespace/countries',
73
75
  'type_name' => 'country',
74
76
  'action' => 'index',
75
77
  'references' => [Base64.encode64('1')],
@@ -81,7 +83,7 @@ describe Chewy::Type::Import::JournalBuilder, :orm do
81
83
  _index: 'chewy_journal',
82
84
  _type: 'journal',
83
85
  data: {
84
- 'index_name' => 'namespace/places',
86
+ 'index_name' => 'namespace/countries',
85
87
  'type_name' => 'country',
86
88
  'action' => 'delete',
87
89
  'references' => [Base64.encode64('2')],
@@ -158,6 +158,15 @@ describe Chewy::Type::Import do
158
158
  specify do
159
159
  expect { import City.where(id: dummy_cities.first.id) }.to update_index(CitiesIndex::City).and_reindex(dummy_cities.first).only
160
160
  end
161
+
162
+ specify do
163
+ allow(CitiesIndex::City).to receive(:import_linear).and_return(double(present?: false))
164
+ allow(CitiesIndex::City).to receive(:import_parallel).and_return(double(present?: false))
165
+
166
+ expects_no_query(except: /SELECT\s+1\s+AS\s+one\s+FROM/) do
167
+ import City.where(id: dummy_cities.first.id)
168
+ end
169
+ end
161
170
  end
162
171
  end
163
172
 
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
 
3
3
  describe Chewy::Type::Mapping do
4
4
  let(:product) { ProductsIndex::Product }
5
- let(:review) { ProductsIndex::Review }
5
+ let(:review) { ReviewsIndex::Review }
6
6
 
7
7
  before do
8
8
  stub_index(:products) do
@@ -20,6 +20,8 @@ describe Chewy::Type::Mapping do
20
20
  end
21
21
  end
22
22
  end
23
+ end
24
+ stub_index(:reviews) do
23
25
  define_type :review do
24
26
  field :title, :body
25
27
  field :comments do
@@ -75,11 +75,11 @@ describe Chewy::Type::Observe do
75
75
  specify { expect { city.save! }.to update_index('cities#city').and_reindex(city).only }
76
76
  specify { expect { city.save! }.to update_index('countries#country').and_reindex(country1).only }
77
77
 
78
- specify { expect { city.update_attributes!(country: nil) }.to update_index('cities#city').and_reindex(city).only }
79
- specify { expect { city.update_attributes!(country: nil) }.to update_index('countries#country').and_reindex(country1).only }
78
+ specify { expect { city.update!(country: nil) }.to update_index('cities#city').and_reindex(city).only }
79
+ specify { expect { city.update!(country: nil) }.to update_index('countries#country').and_reindex(country1).only }
80
80
 
81
- specify { expect { city.update_attributes!(country: country2) }.to update_index('cities#city').and_reindex(city).only }
82
- specify { expect { city.update_attributes!(country: country2) }.to update_index('countries#country').and_reindex(country1, country2).only }
81
+ specify { expect { city.update!(country: country2) }.to update_index('cities#city').and_reindex(city).only }
82
+ specify { expect { city.update!(country: country2) }.to update_index('countries#country').and_reindex(country1, country2).only }
83
83
  end
84
84
 
85
85
  context do
@@ -181,6 +181,21 @@ describe Chewy::Type::Witchcraft do
181
181
  ]}.as_json)
182
182
  end
183
183
  end
184
+
185
+ context do
186
+ mapping do
187
+ field :not_present do
188
+ field :nothing
189
+ end
190
+ end
191
+
192
+ let(:object) do
193
+ double(not_present: nil)
194
+ end
195
+ specify do
196
+ expect(type.cauldron.brew(object)).to eq({not_present: nil}.as_json)
197
+ end
198
+ end
184
199
  end
185
200
 
186
201
  context 'dynamic fields' do
@@ -63,9 +63,11 @@ describe Chewy::Type::Wrapper do
63
63
 
64
64
  it do
65
65
  is_expected.to respond_to(:name_highlight)
66
+ .and respond_to(:name_highlights)
66
67
  .and have_attributes(
67
68
  name: 'Martin',
68
- name_highlight: '<b>Mar</b>tin'
69
+ name_highlight: '<b>Mar</b>tin',
70
+ name_highlights: ['<b>Mar</b>tin']
69
71
  )
70
72
  end
71
73
  end
data/spec/chewy_spec.rb CHANGED
@@ -15,21 +15,18 @@ describe Chewy do
15
15
 
16
16
  stub_index('namespace/autocomplete') do
17
17
  define_type :developer
18
- define_type :company
19
18
  end
20
19
  end
21
20
 
22
21
  specify { expect { described_class.derive_type('some#developers') }.to raise_error(Chewy::UnderivableType, /SomeIndex/) }
23
22
  specify { expect { described_class.derive_type('borogoves#developers') }.to raise_error(Chewy::UnderivableType, /Borogoves/) }
24
23
  specify { expect { described_class.derive_type('developers#borogoves') }.to raise_error(Chewy::UnderivableType, /DevelopersIndex.*borogoves/) }
25
- specify { expect { described_class.derive_type('namespace/autocomplete') }.to raise_error(Chewy::UnderivableType, %r{AutocompleteIndex.*namespace/autocomplete#type_name}) }
26
24
 
27
25
  specify { expect(described_class.derive_type(DevelopersIndex::Developer)).to eq(DevelopersIndex::Developer) }
28
26
  specify { expect(described_class.derive_type('developers_index')).to eq(DevelopersIndex::Developer) }
29
27
  specify { expect(described_class.derive_type('developers')).to eq(DevelopersIndex::Developer) }
30
28
  specify { expect(described_class.derive_type('developers#developer')).to eq(DevelopersIndex::Developer) }
31
29
  specify { expect(described_class.derive_type('namespace/autocomplete#developer')).to eq(Namespace::AutocompleteIndex::Developer) }
32
- specify { expect(described_class.derive_type('namespace/autocomplete#company')).to eq(Namespace::AutocompleteIndex::Company) }
33
30
  end
34
31
 
35
32
  describe '.derive_types' do
@@ -42,7 +39,6 @@ describe Chewy do
42
39
 
43
40
  stub_index('namespace/autocomplete') do
44
41
  define_type :developer
45
- define_type :company
46
42
  end
47
43
  end
48
44
 
@@ -58,7 +54,6 @@ describe Chewy do
58
54
  specify { expect(described_class.derive_types('developers#developer')).to eq([DevelopersIndex::Developer]) }
59
55
  specify { expect(described_class.derive_types('namespace/autocomplete')).to match_array(Namespace::AutocompleteIndex.types) }
60
56
  specify { expect(described_class.derive_types('namespace/autocomplete#developer')).to eq([Namespace::AutocompleteIndex::Developer]) }
61
- specify { expect(described_class.derive_types('namespace/autocomplete#company')).to eq([Namespace::AutocompleteIndex::Company]) }
62
57
  end
63
58
 
64
59
  describe '.create_type' do
@@ -130,7 +125,6 @@ describe Chewy do
130
125
  stub_index(:admins).create!
131
126
  allow(Chewy).to receive_messages(configuration: Chewy.configuration.merge(prefix: 'prefix2'))
132
127
  stub_index(:developers).create!
133
- stub_index(:companies).create!
134
128
 
135
129
  Chewy.massacre
136
130
 
@@ -139,7 +133,6 @@ describe Chewy do
139
133
 
140
134
  specify { expect(AdminsIndex.exists?).to eq(true) }
141
135
  specify { expect(DevelopersIndex.exists?).to eq(false) }
142
- specify { expect(CompaniesIndex.exists?).to eq(false) }
143
136
  end
144
137
 
145
138
  describe '.client' do
data/spec/spec_helper.rb CHANGED
@@ -21,8 +21,11 @@ require 'support/class_helpers'
21
21
 
22
22
  require 'chewy/rspec'
23
23
 
24
+ host = ENV['ES_HOST'] || 'localhost'
25
+ port = ENV['ES_PORT'] || 9250
26
+
24
27
  Chewy.settings = {
25
- host: 'localhost:9250',
28
+ host: "#{host}:#{port}",
26
29
  wait_for_status: 'green',
27
30
  index: {
28
31
  number_of_shards: 1,
@@ -30,15 +33,8 @@ Chewy.settings = {
30
33
  }
31
34
  }
32
35
 
33
- Chewy.default_field_type = 'string' if Chewy::Runtime.version < '5.0'
34
36
  # Chewy.transport_logger = Logger.new(STDERR)
35
37
 
36
- KEYWORD_FIELD = if Chewy::Runtime.version < '5.0'
37
- {type: 'string', index: 'not_analyzed'}
38
- else
39
- {type: 'keyword'}
40
- end
41
-
42
38
  RSpec.configure do |config|
43
39
  config.mock_with :rspec
44
40
  config.order = :random
@@ -29,6 +29,27 @@ module ActiveRecordClassHelpers
29
29
  :active_record
30
30
  end
31
31
 
32
+ def expects_db_queries(&block)
33
+ have_queries = false
34
+ ActiveSupport::Notifications.subscribed(
35
+ ->(*_) { have_queries = true },
36
+ 'sql.active_record',
37
+ &block
38
+ )
39
+ raise 'Expected some db queries, but none were made' unless have_queries
40
+ end
41
+
42
+ def expects_no_query(except: nil, &block)
43
+ queries = []
44
+ ActiveSupport::Notifications.subscribed(
45
+ ->(*args) { queries << args[4][:sql] },
46
+ 'sql.active_record',
47
+ &block
48
+ )
49
+ ofending_queries = except ? queries.find_all { |query| !query.match(except) } : queries
50
+ raise "Expected no DB queries, but the following ones were made: #{ofending_queries.join(', ')}" if ofending_queries.present?
51
+ end
52
+
32
53
  def stub_model(name, superclass = nil, &block)
33
54
  stub_class(name, superclass || ActiveRecord::Base, &block)
34
55
  end
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chewy
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 7.0.1
5
5
  platform: ruby
6
6
  authors:
7
+ - Toptal, LLC
7
8
  - pyromaniac
8
- autorequire:
9
+ autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2018-02-13 00:00:00.000000000 Z
12
+ date: 2021-05-03 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: appraisal
@@ -86,14 +87,14 @@ dependencies:
86
87
  requirements:
87
88
  - - ">="
88
89
  - !ruby/object:Gem::Version
89
- version: '0'
90
+ version: 3.7.0
90
91
  type: :development
91
92
  prerelease: false
92
93
  version_requirements: !ruby/object:Gem::Requirement
93
94
  requirements:
94
95
  - - ">="
95
96
  - !ruby/object:Gem::Version
96
- version: '0'
97
+ version: 3.7.0
97
98
  - !ruby/object:Gem::Dependency
98
99
  name: rspec-collection_matchers
99
100
  requirement: !ruby/object:Gem::Requirement
@@ -198,28 +199,28 @@ dependencies:
198
199
  requirements:
199
200
  - - ">="
200
201
  - !ruby/object:Gem::Version
201
- version: '4.0'
202
+ version: '5.2'
202
203
  type: :runtime
203
204
  prerelease: false
204
205
  version_requirements: !ruby/object:Gem::Requirement
205
206
  requirements:
206
207
  - - ">="
207
208
  - !ruby/object:Gem::Version
208
- version: '4.0'
209
+ version: '5.2'
209
210
  - !ruby/object:Gem::Dependency
210
211
  name: elasticsearch
211
212
  requirement: !ruby/object:Gem::Requirement
212
213
  requirements:
213
214
  - - ">="
214
215
  - !ruby/object:Gem::Version
215
- version: 2.0.0
216
+ version: 6.3.0
216
217
  type: :runtime
217
218
  prerelease: false
218
219
  version_requirements: !ruby/object:Gem::Requirement
219
220
  requirements:
220
221
  - - ">="
221
222
  - !ruby/object:Gem::Version
222
- version: 2.0.0
223
+ version: 6.3.0
223
224
  - !ruby/object:Gem::Dependency
224
225
  name: elasticsearch-dsl
225
226
  requirement: !ruby/object:Gem::Requirement
@@ -237,36 +238,37 @@ dependencies:
237
238
  description: Chewy provides functionality for Elasticsearch index handling, documents
238
239
  import mappings and chainable query DSL
239
240
  email:
241
+ - open-source@toptal.com
240
242
  - kinwizard@gmail.com
241
243
  executables: []
242
244
  extensions: []
243
245
  extra_rdoc_files: []
244
246
  files:
247
+ - ".circleci/config.yml"
248
+ - ".github/ISSUE_TEMPLATE/bug_report.md"
249
+ - ".github/ISSUE_TEMPLATE/feature_request.md"
250
+ - ".github/PULL_REQUEST_TEMPLATE.md"
251
+ - ".github/workflows/ruby.yml"
245
252
  - ".gitignore"
246
253
  - ".rspec"
247
254
  - ".rubocop.yml"
248
255
  - ".rubocop_todo.yml"
249
- - ".travis.yml"
250
256
  - ".yardopts"
251
257
  - Appraisals
252
258
  - CHANGELOG.md
259
+ - CODE_OF_CONDUCT.md
260
+ - CONTRIBUTING.md
253
261
  - Gemfile
254
262
  - Guardfile
255
- - LEGACY_DSL.md
256
263
  - LICENSE.txt
257
264
  - README.md
258
265
  - Rakefile
259
266
  - chewy.gemspec
260
267
  - filters
261
- - gemfiles/rails.4.0.activerecord.gemfile
262
- - gemfiles/rails.4.1.activerecord.gemfile
263
- - gemfiles/rails.4.2.activerecord.gemfile
264
- - gemfiles/rails.4.2.mongoid.5.2.gemfile
265
- - gemfiles/rails.5.0.activerecord.gemfile
266
- - gemfiles/rails.5.0.mongoid.6.1.gemfile
267
- - gemfiles/rails.5.1.activerecord.gemfile
268
- - gemfiles/rails.5.1.mongoid.6.3.gemfile
269
268
  - gemfiles/rails.5.2.activerecord.gemfile
269
+ - gemfiles/rails.5.2.mongoid.6.4.gemfile
270
+ - gemfiles/rails.6.0.activerecord.gemfile
271
+ - gemfiles/rails.6.1.activerecord.gemfile
270
272
  - gemfiles/sequel.4.45.gemfile
271
273
  - lib/chewy.rb
272
274
  - lib/chewy/backports/deep_dup.rb
@@ -285,32 +287,7 @@ files:
285
287
  - lib/chewy/minitest.rb
286
288
  - lib/chewy/minitest/helpers.rb
287
289
  - lib/chewy/minitest/search_index_receiver.rb
288
- - lib/chewy/query.rb
289
- - lib/chewy/query/compose.rb
290
- - lib/chewy/query/criteria.rb
291
- - lib/chewy/query/filters.rb
292
- - lib/chewy/query/loading.rb
293
- - lib/chewy/query/nodes/and.rb
294
- - lib/chewy/query/nodes/base.rb
295
- - lib/chewy/query/nodes/bool.rb
296
- - lib/chewy/query/nodes/equal.rb
297
- - lib/chewy/query/nodes/exists.rb
298
- - lib/chewy/query/nodes/expr.rb
299
- - lib/chewy/query/nodes/field.rb
300
- - lib/chewy/query/nodes/has_child.rb
301
- - lib/chewy/query/nodes/has_parent.rb
302
- - lib/chewy/query/nodes/has_relation.rb
303
- - lib/chewy/query/nodes/match_all.rb
304
- - lib/chewy/query/nodes/missing.rb
305
- - lib/chewy/query/nodes/not.rb
306
- - lib/chewy/query/nodes/or.rb
307
- - lib/chewy/query/nodes/prefix.rb
308
- - lib/chewy/query/nodes/query.rb
309
- - lib/chewy/query/nodes/range.rb
310
- - lib/chewy/query/nodes/raw.rb
311
- - lib/chewy/query/nodes/regexp.rb
312
- - lib/chewy/query/nodes/script.rb
313
- - lib/chewy/query/pagination.rb
290
+ - lib/chewy/multi_search.rb
314
291
  - lib/chewy/railtie.rb
315
292
  - lib/chewy/rake_helper.rb
316
293
  - lib/chewy/repository.rb
@@ -324,6 +301,7 @@ files:
324
301
  - lib/chewy/search/pagination/will_paginate.rb
325
302
  - lib/chewy/search/parameters.rb
326
303
  - lib/chewy/search/parameters/aggs.rb
304
+ - lib/chewy/search/parameters/allow_partial_search_results.rb
327
305
  - lib/chewy/search/parameters/concerns/bool_storage.rb
328
306
  - lib/chewy/search/parameters/concerns/hash_storage.rb
329
307
  - lib/chewy/search/parameters/concerns/integer_storage.rb
@@ -334,6 +312,7 @@ files:
334
312
  - lib/chewy/search/parameters/explain.rb
335
313
  - lib/chewy/search/parameters/filter.rb
336
314
  - lib/chewy/search/parameters/highlight.rb
315
+ - lib/chewy/search/parameters/indices.rb
337
316
  - lib/chewy/search/parameters/indices_boost.rb
338
317
  - lib/chewy/search/parameters/limit.rb
339
318
  - lib/chewy/search/parameters/load.rb
@@ -398,6 +377,7 @@ files:
398
377
  - lib/generators/templates/chewy.yml
399
378
  - lib/sequel/plugins/chewy_observe.rb
400
379
  - lib/tasks/chewy.rake
380
+ - migration_guide.md
401
381
  - spec/chewy/config_spec.rb
402
382
  - spec/chewy/fields/base_spec.rb
403
383
  - spec/chewy/fields/root_spec.rb
@@ -410,29 +390,7 @@ files:
410
390
  - spec/chewy/journal_spec.rb
411
391
  - spec/chewy/minitest/helpers_spec.rb
412
392
  - spec/chewy/minitest/search_index_receiver_spec.rb
413
- - spec/chewy/query/criteria_spec.rb
414
- - spec/chewy/query/filters_spec.rb
415
- - spec/chewy/query/loading_spec.rb
416
- - spec/chewy/query/nodes/and_spec.rb
417
- - spec/chewy/query/nodes/bool_spec.rb
418
- - spec/chewy/query/nodes/equal_spec.rb
419
- - spec/chewy/query/nodes/exists_spec.rb
420
- - spec/chewy/query/nodes/has_child_spec.rb
421
- - spec/chewy/query/nodes/has_parent_spec.rb
422
- - spec/chewy/query/nodes/match_all_spec.rb
423
- - spec/chewy/query/nodes/missing_spec.rb
424
- - spec/chewy/query/nodes/not_spec.rb
425
- - spec/chewy/query/nodes/or_spec.rb
426
- - spec/chewy/query/nodes/prefix_spec.rb
427
- - spec/chewy/query/nodes/query_spec.rb
428
- - spec/chewy/query/nodes/range_spec.rb
429
- - spec/chewy/query/nodes/raw_spec.rb
430
- - spec/chewy/query/nodes/regexp_spec.rb
431
- - spec/chewy/query/nodes/script_spec.rb
432
- - spec/chewy/query/pagination/kaminari_spec.rb
433
- - spec/chewy/query/pagination/will_paginate_spec.rb
434
- - spec/chewy/query/pagination_spec.rb
435
- - spec/chewy/query_spec.rb
393
+ - spec/chewy/multi_search_spec.rb
436
394
  - spec/chewy/rake_helper_spec.rb
437
395
  - spec/chewy/repository_spec.rb
438
396
  - spec/chewy/rspec/update_index_spec.rb
@@ -450,7 +408,7 @@ files:
450
408
  - spec/chewy/search/parameters/filter_spec.rb
451
409
  - spec/chewy/search/parameters/hash_storage_examples.rb
452
410
  - spec/chewy/search/parameters/highlight_spec.rb
453
- - spec/chewy/search/parameters/indices_boost_spec.rb
411
+ - spec/chewy/search/parameters/indices_spec.rb
454
412
  - spec/chewy/search/parameters/integer_storage_examples.rb
455
413
  - spec/chewy/search/parameters/limit_spec.rb
456
414
  - spec/chewy/search/parameters/load_spec.rb
@@ -519,7 +477,7 @@ homepage: https://github.com/toptal/chewy
519
477
  licenses:
520
478
  - MIT
521
479
  metadata: {}
522
- post_install_message:
480
+ post_install_message:
523
481
  rdoc_options: []
524
482
  require_paths:
525
483
  - lib
@@ -534,9 +492,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
534
492
  - !ruby/object:Gem::Version
535
493
  version: '0'
536
494
  requirements: []
537
- rubyforge_project:
538
- rubygems_version: 2.7.4
539
- signing_key:
495
+ rubygems_version: 3.1.2
496
+ signing_key:
540
497
  specification_version: 4
541
498
  summary: Elasticsearch ODM client wrapper
542
499
  test_files:
@@ -552,29 +509,7 @@ test_files:
552
509
  - spec/chewy/journal_spec.rb
553
510
  - spec/chewy/minitest/helpers_spec.rb
554
511
  - spec/chewy/minitest/search_index_receiver_spec.rb
555
- - spec/chewy/query/criteria_spec.rb
556
- - spec/chewy/query/filters_spec.rb
557
- - spec/chewy/query/loading_spec.rb
558
- - spec/chewy/query/nodes/and_spec.rb
559
- - spec/chewy/query/nodes/bool_spec.rb
560
- - spec/chewy/query/nodes/equal_spec.rb
561
- - spec/chewy/query/nodes/exists_spec.rb
562
- - spec/chewy/query/nodes/has_child_spec.rb
563
- - spec/chewy/query/nodes/has_parent_spec.rb
564
- - spec/chewy/query/nodes/match_all_spec.rb
565
- - spec/chewy/query/nodes/missing_spec.rb
566
- - spec/chewy/query/nodes/not_spec.rb
567
- - spec/chewy/query/nodes/or_spec.rb
568
- - spec/chewy/query/nodes/prefix_spec.rb
569
- - spec/chewy/query/nodes/query_spec.rb
570
- - spec/chewy/query/nodes/range_spec.rb
571
- - spec/chewy/query/nodes/raw_spec.rb
572
- - spec/chewy/query/nodes/regexp_spec.rb
573
- - spec/chewy/query/nodes/script_spec.rb
574
- - spec/chewy/query/pagination/kaminari_spec.rb
575
- - spec/chewy/query/pagination/will_paginate_spec.rb
576
- - spec/chewy/query/pagination_spec.rb
577
- - spec/chewy/query_spec.rb
512
+ - spec/chewy/multi_search_spec.rb
578
513
  - spec/chewy/rake_helper_spec.rb
579
514
  - spec/chewy/repository_spec.rb
580
515
  - spec/chewy/rspec/update_index_spec.rb
@@ -592,7 +527,7 @@ test_files:
592
527
  - spec/chewy/search/parameters/filter_spec.rb
593
528
  - spec/chewy/search/parameters/hash_storage_examples.rb
594
529
  - spec/chewy/search/parameters/highlight_spec.rb
595
- - spec/chewy/search/parameters/indices_boost_spec.rb
530
+ - spec/chewy/search/parameters/indices_spec.rb
596
531
  - spec/chewy/search/parameters/integer_storage_examples.rb
597
532
  - spec/chewy/search/parameters/limit_spec.rb
598
533
  - spec/chewy/search/parameters/load_spec.rb