elasticated 2.4.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/elasticated.rb +20 -0
- data/lib/elasticated/aggregation.rb +4 -0
- data/lib/elasticated/aggregations/filter_aggregation.rb +4 -0
- data/lib/elasticated/boolean_clause.rb +8 -0
- data/lib/elasticated/conditions/custom_condition.rb +2 -2
- data/lib/elasticated/conditions/range_condition.rb +2 -5
- data/lib/elasticated/conditions/script_condition.rb +2 -2
- data/lib/elasticated/conditions/standard_condition.rb +2 -2
- data/lib/elasticated/conditions/terms_condition.rb +2 -2
- data/lib/elasticated/date_delimiter_factory.rb +123 -0
- data/lib/elasticated/delimiter_visitor.rb +51 -0
- data/lib/elasticated/delimiters/date_field_delimiter.rb +14 -19
- data/lib/elasticated/delimiters/standard_field_delimiter.rb +2 -18
- data/lib/elasticated/delimiters/term_field_delimiter.rb +5 -6
- data/lib/elasticated/index_selector.rb +10 -12
- data/lib/elasticated/partitioned_repository.rb +9 -4
- data/lib/elasticated/query.rb +4 -5
- data/lib/elasticated/query_aggregations.rb +5 -1
- data/lib/elasticated/query_conditions.rb +2 -4
- data/lib/elasticated/strategy_params_for_query_service.rb +14 -0
- data/lib/elasticated/term_delimiter_factory.rb +71 -0
- data/lib/version.rb +5 -1
- data/spec/date_field_delimiter_spec.rb +4 -43
- data/spec/delimiter_factory_spec.rb +366 -0
- data/spec/query_conditions_spec.rb +0 -59
- data/spec/strategy_params_for_query_service_spec.rb +328 -0
- data/spec/term_field_delimiter_spec.rb +8 -8
- metadata +28 -20
@@ -251,64 +251,5 @@ module Elasticated
|
|
251
251
|
|
252
252
|
end
|
253
253
|
|
254
|
-
describe "the term delimiter" do
|
255
|
-
|
256
|
-
let :delimiter do
|
257
|
-
Delimiters::TermFieldDelimiter.new field: :account_id, as: :account
|
258
|
-
end
|
259
|
-
|
260
|
-
it "should not delimit anything" do
|
261
|
-
qc.equal :other_field, 68
|
262
|
-
qc.fill_delimiter delimiter
|
263
|
-
params = delimiter.build_strategy_params
|
264
|
-
expect(params).to be_empty
|
265
|
-
end
|
266
|
-
|
267
|
-
it "should delimit a single condition" do
|
268
|
-
qc.equal :account_id, 68
|
269
|
-
qc.fill_delimiter delimiter
|
270
|
-
params = delimiter.build_strategy_params
|
271
|
-
expect(params).to eq account: [68]
|
272
|
-
end
|
273
|
-
|
274
|
-
it "should delimit by multiple conditions (part 1)" do
|
275
|
-
qc.equal :account_id, [68, 31]
|
276
|
-
qc.fill_delimiter delimiter
|
277
|
-
params = delimiter.build_strategy_params
|
278
|
-
expect(params).to eq account: [68, 31]
|
279
|
-
end
|
280
|
-
|
281
|
-
it "should delimit a multiple conditions (part 2)" do
|
282
|
-
qc.equal :account_id, 68
|
283
|
-
qc.equal :account_id, 31
|
284
|
-
qc.fill_delimiter delimiter
|
285
|
-
params = delimiter.build_strategy_params
|
286
|
-
expect(params).to eq account: [68, 31]
|
287
|
-
end
|
288
|
-
|
289
|
-
it "should delimit by nested conditions" do
|
290
|
-
qc.equal :account_id, 68
|
291
|
-
qc.bool do
|
292
|
-
equal :account_id, 31
|
293
|
-
end
|
294
|
-
qc.fill_delimiter delimiter
|
295
|
-
params = delimiter.build_strategy_params
|
296
|
-
expect(params).to eq account: [68, 31]
|
297
|
-
end
|
298
|
-
|
299
|
-
it "should delimit only by the 'must' part of nested conditions" do
|
300
|
-
qc.equal :account_id, 68
|
301
|
-
qc.bool do
|
302
|
-
must{ equal :account_id, 31 }
|
303
|
-
must_not{ equal :account_id, 85 }
|
304
|
-
should{ equal :account_id, 58 }
|
305
|
-
end
|
306
|
-
qc.fill_delimiter delimiter
|
307
|
-
params = delimiter.build_strategy_params
|
308
|
-
expect(params).to eq account: [68, 31]
|
309
|
-
end
|
310
|
-
|
311
|
-
end
|
312
|
-
|
313
254
|
end
|
314
255
|
end
|
@@ -0,0 +1,328 @@
|
|
1
|
+
require_relative 'spec_helper'
|
2
|
+
module Elasticated
|
3
|
+
|
4
|
+
describe StrategyParamsForQueryService do
|
5
|
+
let(:query){ Query.new }
|
6
|
+
let(:service){StrategyParamsForQueryService.new}
|
7
|
+
|
8
|
+
it 'should create empty delimiter' do
|
9
|
+
delimiters = []
|
10
|
+
expected = {}
|
11
|
+
actual = service.strategy_params_for_query(delimiters, query)
|
12
|
+
expect(actual).to eq expected
|
13
|
+
|
14
|
+
delimiters = [Elasticated::Delimiters::TermFieldDelimiter.new(field: :account, as: :accounts)]
|
15
|
+
actual = service.strategy_params_for_query(delimiters,query)
|
16
|
+
expect(actual).to eq expected
|
17
|
+
|
18
|
+
delimiters = [
|
19
|
+
Elasticated::Delimiters::TermFieldDelimiter.new(field: :account, as: :accounts),
|
20
|
+
Elasticated::Delimiters::DateFieldDelimiter.new(field: :date)
|
21
|
+
]
|
22
|
+
actual = service.strategy_params_for_query(delimiters,query)
|
23
|
+
expect(actual).to eq expected
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'should create term dalimiter with a date' do
|
27
|
+
delimiters = [Elasticated::Delimiters::TermFieldDelimiter.new(field: :date)]
|
28
|
+
query.filter {equal :date, '2017-05-28'}
|
29
|
+
expected = {date: ['2017-05-28']}
|
30
|
+
actual = service.strategy_params_for_query(delimiters, query)
|
31
|
+
expect(actual).to eq expected
|
32
|
+
end
|
33
|
+
|
34
|
+
it 'should create date delimiter with date since' do
|
35
|
+
delimiters = [Elasticated::Delimiters::DateFieldDelimiter.new(field: :date)]
|
36
|
+
query.filter {greater_than :date, '2017-05-28'}
|
37
|
+
expected = {date_since: '2017-05-28'}
|
38
|
+
actual = service.strategy_params_for_query(delimiters, query)
|
39
|
+
expect(actual).to eq expected
|
40
|
+
end
|
41
|
+
|
42
|
+
it 'should create date delimiter with date until' do
|
43
|
+
delimiters = [Elasticated::Delimiters::DateFieldDelimiter.new(field: :date)]
|
44
|
+
query.filter {less_equal :date, '2017-05-30'}
|
45
|
+
expected = {date_until: '2017-05-30'}
|
46
|
+
actual = service.strategy_params_for_query(delimiters, query)
|
47
|
+
expect(actual).to eq expected
|
48
|
+
end
|
49
|
+
|
50
|
+
it 'should create date delimiter with date since and date until' do
|
51
|
+
delimiters = [Elasticated::Delimiters::DateFieldDelimiter.new(field: :date)]
|
52
|
+
query.filter {between :date, '2017-05-28', '2017-05-30'}
|
53
|
+
expected = {date_since: '2017-05-28', date_until: '2017-05-30'}
|
54
|
+
actual = service.strategy_params_for_query(delimiters, query)
|
55
|
+
expect(actual).to eq expected
|
56
|
+
end
|
57
|
+
|
58
|
+
it 'should create term delimiter from aggregations' do
|
59
|
+
options = {delimit_by: [:aggregations]}
|
60
|
+
delimiters = [Elasticated::Delimiters::TermFieldDelimiter.new(field: :account, as: :accounts)]
|
61
|
+
query.aggregations do
|
62
|
+
filter :account do
|
63
|
+
conditions { equal :account, 39 }
|
64
|
+
end
|
65
|
+
filter :second_account do
|
66
|
+
conditions { equal :account, 40 }
|
67
|
+
end
|
68
|
+
end
|
69
|
+
expected = {accounts: [39, 40]}
|
70
|
+
actual = service.strategy_params_for_query(delimiters, query, options)
|
71
|
+
expect(actual).to eq expected
|
72
|
+
end
|
73
|
+
|
74
|
+
it 'should create date delimiter with date since from aggregations' do
|
75
|
+
options = {delimit_by: [:aggregations]}
|
76
|
+
delimiters = [Elasticated::Delimiters::DateFieldDelimiter.new(field: :date)]
|
77
|
+
query.aggregations do
|
78
|
+
filter :greater do
|
79
|
+
conditions { greater_than :date, '2017-05-29' }
|
80
|
+
end
|
81
|
+
filter :greater_eq do
|
82
|
+
conditions { greater_equal :date, '2017-05-27' }
|
83
|
+
end
|
84
|
+
end
|
85
|
+
expected = {date_since: '2017-05-27'}
|
86
|
+
actual = service.strategy_params_for_query(delimiters, query, options)
|
87
|
+
expect(actual).to eq expected
|
88
|
+
end
|
89
|
+
|
90
|
+
it 'should create date delimiter with date until from aggregations' do
|
91
|
+
options = {delimit_by: [:aggregations]}
|
92
|
+
delimiters = [Elasticated::Delimiters::DateFieldDelimiter.new(field: :date)]
|
93
|
+
query.aggregations do
|
94
|
+
filter :less do
|
95
|
+
conditions { less_than :date, '2017-05-29' }
|
96
|
+
end
|
97
|
+
filter :less_eq do
|
98
|
+
conditions { less_equal :date, '2017-05-27' }
|
99
|
+
end
|
100
|
+
end
|
101
|
+
expected = {date_until: '2017-05-29'}
|
102
|
+
actual = service.strategy_params_for_query(delimiters, query, options)
|
103
|
+
expect(actual).to eq expected
|
104
|
+
end
|
105
|
+
|
106
|
+
it 'should create date delimiter with date since and date until from aggregations' do
|
107
|
+
options = {delimit_by: [:aggregations]}
|
108
|
+
delimiters = [Elasticated::Delimiters::DateFieldDelimiter.new(field: :date)]
|
109
|
+
query.aggregations do
|
110
|
+
filter :greater_and_less_1 do
|
111
|
+
conditions { between :date, '2017-05-24', '2017-05-25' }
|
112
|
+
end
|
113
|
+
filter :greater_and_less_2 do
|
114
|
+
conditions { between :date, '2017-05-27', '2017-05-28' }
|
115
|
+
end
|
116
|
+
end
|
117
|
+
expected = {date_since: '2017-05-24', date_until: '2017-05-28'}
|
118
|
+
actual = service.strategy_params_for_query(delimiters, query, options)
|
119
|
+
expect(actual).to eq expected
|
120
|
+
end
|
121
|
+
|
122
|
+
it 'should create date delimiter without date since nor date until from aggregations' do
|
123
|
+
options = {delimit_by: [:aggregations]}
|
124
|
+
delimiters = [Elasticated::Delimiters::DateFieldDelimiter.new(field: :date)]
|
125
|
+
query.aggregations do
|
126
|
+
filter :greater_and_less_1 do
|
127
|
+
conditions { between :date, '2017-05-24', '2017-05-25' }
|
128
|
+
end
|
129
|
+
filter :greater_and_less_2 do
|
130
|
+
conditions { between :date, '2017-05-27', '2017-05-28' }
|
131
|
+
end
|
132
|
+
filter :not_dates do
|
133
|
+
conditions { equal :account, 39 }
|
134
|
+
end
|
135
|
+
end
|
136
|
+
expected = {}
|
137
|
+
actual = service.strategy_params_for_query(delimiters, query, options)
|
138
|
+
expect(actual).to eq expected
|
139
|
+
end
|
140
|
+
|
141
|
+
it 'should create term delimiter with date from conditions and aggregations' do
|
142
|
+
options = {delimit_by: [:conditions, :aggregations]}
|
143
|
+
delimiters = [Elasticated::Delimiters::TermFieldDelimiter.new(field: :date)]
|
144
|
+
query.filter {equal :date, '2017-05-23'}
|
145
|
+
query.aggregations do
|
146
|
+
filter :date_zero do
|
147
|
+
conditions { equal :date, '2017-05-24' }
|
148
|
+
end
|
149
|
+
end
|
150
|
+
expected = {date: ['2017-05-23']}
|
151
|
+
actual = service.strategy_params_for_query(delimiters, query, options)
|
152
|
+
expect(actual).to eq expected
|
153
|
+
end
|
154
|
+
|
155
|
+
it 'should create date delimiter with date since from conditions and aggregations' do
|
156
|
+
options = {delimit_by: [:conditions, :aggregations]}
|
157
|
+
delimiters = [Elasticated::Delimiters::DateFieldDelimiter.new(field: :date)]
|
158
|
+
query.filter {greater_than :date, '2017-05-23'}
|
159
|
+
query.aggregations do
|
160
|
+
filter :greater_than_1 do
|
161
|
+
conditions { greater_than :date, '2017-05-30' }
|
162
|
+
end
|
163
|
+
end
|
164
|
+
expected = {date_since: '2017-05-23'}
|
165
|
+
actual = service.strategy_params_for_query(delimiters, query, options)
|
166
|
+
expect(actual).to eq expected
|
167
|
+
end
|
168
|
+
|
169
|
+
it 'should create date delimiter with date until from conditions and aggregations' do
|
170
|
+
options = {delimit_by: [:conditions, :aggregations]}
|
171
|
+
delimiters = [Elasticated::Delimiters::DateFieldDelimiter.new(field: :date)]
|
172
|
+
query.filter {less_than :date, '2017-05-23'}
|
173
|
+
query.aggregations do
|
174
|
+
filter :greater_than_1 do
|
175
|
+
conditions { less_equal :date, '2017-05-30' }
|
176
|
+
end
|
177
|
+
end
|
178
|
+
expected = {date_until: '2017-05-23'}
|
179
|
+
actual = service.strategy_params_for_query(delimiters, query, options)
|
180
|
+
expect(actual).to eq expected
|
181
|
+
end
|
182
|
+
|
183
|
+
it 'should create date delimiter with date since and date until from conditions and aggregations' do
|
184
|
+
options = {delimit_by: [:conditions, :aggregations]}
|
185
|
+
delimiters = [Elasticated::Delimiters::DateFieldDelimiter.new(field: :date)]
|
186
|
+
query.filter {between :date, '2017-05-23', '2017-05-30'}
|
187
|
+
query.aggregations do
|
188
|
+
filter :greater_and_less_1 do
|
189
|
+
conditions { between :date, '2017-05-01', '2017-05-22' }
|
190
|
+
end
|
191
|
+
filter :greater_and_less_2 do
|
192
|
+
conditions { between :date, '2017-05-31', '2017-06-01' }
|
193
|
+
end
|
194
|
+
end
|
195
|
+
expected = {date_since: '2017-05-23', date_until: '2017-05-30'}
|
196
|
+
actual = service.strategy_params_for_query(delimiters, query, options)
|
197
|
+
expect(actual).to eq expected
|
198
|
+
end
|
199
|
+
|
200
|
+
it 'should create date delimiter with date since and date until from conditions and aggregations but without query conditions defined' do
|
201
|
+
options = {delimit_by: [:conditions, :aggregations]}
|
202
|
+
delimiters = [Elasticated::Delimiters::DateFieldDelimiter.new(field: :date)]
|
203
|
+
query.aggregations do
|
204
|
+
filter :greater_and_less_1 do
|
205
|
+
conditions { between :date, '2017-05-01', '2017-05-22' }
|
206
|
+
end
|
207
|
+
filter :greater_and_less_2 do
|
208
|
+
conditions { between :date, '2017-05-31', '2017-06-10' }
|
209
|
+
end
|
210
|
+
end
|
211
|
+
expected = {date_since: '2017-05-01', date_until: '2017-06-10'}
|
212
|
+
actual = service.strategy_params_for_query(delimiters, query, options)
|
213
|
+
expect(actual).to eq expected
|
214
|
+
end
|
215
|
+
|
216
|
+
it 'should create date delimiter with date since from conditions and aggregations when one aggregation has not date until' do
|
217
|
+
options = {delimit_by: [:conditions, :aggregations]}
|
218
|
+
delimiters = [Elasticated::Delimiters::DateFieldDelimiter.new(field: :date)]
|
219
|
+
query.filter {greater_than :date, '2017-05-23'}
|
220
|
+
query.aggregations do
|
221
|
+
filter :greater_and_less_1 do
|
222
|
+
conditions { between :date, '2017-05-01', '2017-05-22' }
|
223
|
+
end
|
224
|
+
filter :greater_and_less_2 do
|
225
|
+
conditions { between :date, '2017-05-31', '2017-06-10' }
|
226
|
+
end
|
227
|
+
filter :greater_eq do
|
228
|
+
conditions { greater_equal :date, '2017-05-31' }
|
229
|
+
end
|
230
|
+
end
|
231
|
+
expected = {date_since: '2017-05-23'}
|
232
|
+
actual = service.strategy_params_for_query(delimiters, query, options)
|
233
|
+
expect(actual).to eq expected
|
234
|
+
end
|
235
|
+
|
236
|
+
it 'should create date delimiter with date since from conditions and aggregations when one aggregation has account filter' do
|
237
|
+
options = {delimit_by: [:conditions, :aggregations]}
|
238
|
+
delimiters = [Elasticated::Delimiters::DateFieldDelimiter.new(field: :date)]
|
239
|
+
query.filter {greater_than :date, '2017-05-23'}
|
240
|
+
query.aggregations do
|
241
|
+
filter :greater_and_less_1 do
|
242
|
+
conditions { between :date, '2017-05-01', '2017-05-22' }
|
243
|
+
end
|
244
|
+
filter :greater_and_less_2 do
|
245
|
+
conditions { between :date, '2017-05-31', '2017-06-10' }
|
246
|
+
end
|
247
|
+
filter :by_account do
|
248
|
+
conditions { equal :account, 39 }
|
249
|
+
end
|
250
|
+
end
|
251
|
+
expected = {date_since: '2017-05-23'}
|
252
|
+
actual = service.strategy_params_for_query(delimiters, query, options)
|
253
|
+
expect(actual).to eq expected
|
254
|
+
end
|
255
|
+
|
256
|
+
it 'should create date delimiter with date since from conditions and aggregations when one aggregation has account filter' do
|
257
|
+
options = {delimit_by: [:conditions, :aggregations]}
|
258
|
+
delimiters = [Elasticated::Delimiters::DateFieldDelimiter.new(field: :date), Elasticated::Delimiters::TermFieldDelimiter.new(field: :account, as: :accounts)]
|
259
|
+
query.filter {greater_than :date, '2017-05-23'}
|
260
|
+
query.aggregations do
|
261
|
+
filter :greater_and_less_1 do
|
262
|
+
conditions { between :date, '2017-05-01', '2017-05-22' }
|
263
|
+
end
|
264
|
+
filter :greater_and_less_2 do
|
265
|
+
conditions { between :date, '2017-05-31', '2017-06-10' }
|
266
|
+
end
|
267
|
+
filter :by_account do
|
268
|
+
conditions { equal :account, 39 }
|
269
|
+
end
|
270
|
+
end
|
271
|
+
expected = {date_since: '2017-05-23'}
|
272
|
+
actual = service.strategy_params_for_query(delimiters, query, options)
|
273
|
+
expect(actual).to eq expected
|
274
|
+
end
|
275
|
+
|
276
|
+
it 'should create date delimiter as term' do
|
277
|
+
options = {delimit_by: [:conditions]}
|
278
|
+
delimiters = [Elasticated::Delimiters::DateFieldDelimiter.new(field: :date)]
|
279
|
+
query.filter {equal :date, '2017-05-23'}
|
280
|
+
expected = {date: '2017-05-23'}
|
281
|
+
actual = service.strategy_params_for_query(delimiters, query, options)
|
282
|
+
expect(actual).to eq expected
|
283
|
+
end
|
284
|
+
|
285
|
+
it 'should create date delimiter as term from aggregations' do
|
286
|
+
options = {delimit_by: [:aggregations]}
|
287
|
+
delimiters = [Elasticated::Delimiters::DateFieldDelimiter.new(field: :date)]
|
288
|
+
query.aggregations do
|
289
|
+
filter :greater_and_less_1 do
|
290
|
+
conditions { equal :date, '2017-05-01' }
|
291
|
+
end
|
292
|
+
end
|
293
|
+
expected = {date: '2017-05-01'}
|
294
|
+
actual = service.strategy_params_for_query(delimiters, query, options)
|
295
|
+
expect(actual).to eq expected
|
296
|
+
end
|
297
|
+
|
298
|
+
it 'should create date delimiter as term from condition and aggregations' do
|
299
|
+
options = {delimit_by: [:conditions, :aggregations]}
|
300
|
+
delimiters = [Elasticated::Delimiters::DateFieldDelimiter.new(field: :date)]
|
301
|
+
query.filter {equal :date, '2017-05-23'}
|
302
|
+
query.aggregations do
|
303
|
+
filter :greater_and_less_1 do
|
304
|
+
conditions { equal :date, '2017-05-01' }
|
305
|
+
end
|
306
|
+
end
|
307
|
+
expected = {date: '2017-05-23'}
|
308
|
+
actual = service.strategy_params_for_query(delimiters, query, options)
|
309
|
+
expect(actual).to eq expected
|
310
|
+
end
|
311
|
+
|
312
|
+
it 'should create date delimiter as range from terms condition and aggregations' do
|
313
|
+
options = {delimit_by: [:conditions, :aggregations]}
|
314
|
+
delimiters = [Elasticated::Delimiters::DateFieldDelimiter.new(field: :date)]
|
315
|
+
query.filter {equal :date, ['2017-05-23', '2017-06-01']}
|
316
|
+
query.aggregations do
|
317
|
+
filter :greater_and_less_1 do
|
318
|
+
conditions { equal :date, '2017-05-01' }
|
319
|
+
end
|
320
|
+
end
|
321
|
+
expected = {date_since: '2017-05-23', date_until: '2017-06-01'}
|
322
|
+
actual = service.strategy_params_for_query(delimiters, query, options)
|
323
|
+
expect(actual).to eq expected
|
324
|
+
end
|
325
|
+
|
326
|
+
end
|
327
|
+
|
328
|
+
end
|
@@ -4,32 +4,32 @@ module Elasticated
|
|
4
4
|
module Delimiters
|
5
5
|
describe TermFieldDelimiter do
|
6
6
|
|
7
|
-
let :
|
7
|
+
let :empty_delimiter do
|
8
8
|
TermFieldDelimiter.new field: :account_id, as: :account
|
9
9
|
end
|
10
10
|
|
11
11
|
it "should not delimit anything" do
|
12
|
-
params =
|
12
|
+
params = empty_delimiter.build_strategy_params
|
13
13
|
expect(params).to be_empty
|
14
14
|
end
|
15
15
|
|
16
16
|
it "should delimit by one term" do
|
17
|
-
delimiter.
|
17
|
+
delimiter = empty_delimiter.completed_with conditions: [{account_id: 'nombre1'}], aggregations: []
|
18
18
|
params = delimiter.build_strategy_params
|
19
19
|
expect(params).to eq account: ['nombre1']
|
20
20
|
end
|
21
21
|
|
22
22
|
it "should delimit by multiple terms" do
|
23
|
-
delimiter.
|
24
|
-
delimiter.
|
23
|
+
delimiter = empty_delimiter.completed_with conditions: [{account_id: 'nombre1'}]
|
24
|
+
delimiter = delimiter.completed_with conditions: [{account_id: 'nombre2'}]
|
25
25
|
params = delimiter.build_strategy_params
|
26
26
|
expect(params).to eq account: ['nombre1', 'nombre2']
|
27
27
|
end
|
28
28
|
|
29
29
|
it "should ignore duplicated terms" do
|
30
|
-
delimiter.
|
31
|
-
delimiter.
|
32
|
-
delimiter.
|
30
|
+
delimiter = empty_delimiter.completed_with conditions: [{account_id: 'nombre2'}]
|
31
|
+
delimiter = delimiter.completed_with conditions: [{account_id: 'nombre2'}]
|
32
|
+
delimiter = delimiter.completed_with conditions: [{account_id: 'nombre1'}]
|
33
33
|
params = delimiter.build_strategy_params
|
34
34
|
expect(params).to eq account: ['nombre2', 'nombre1']
|
35
35
|
end
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elasticated
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pablo Fernandez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.5'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.5'
|
27
27
|
- !ruby/object:Gem::Dependency
|
@@ -42,76 +42,76 @@ dependencies:
|
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: pry-byebug
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: elasticsearch
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - '>='
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: hash_ext
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ~>
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: 0.1.1
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ~>
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 0.1.1
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: timing
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ~>
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0.0'
|
104
|
-
- -
|
104
|
+
- - '>='
|
105
105
|
- !ruby/object:Gem::Version
|
106
106
|
version: 0.0.9
|
107
107
|
type: :runtime
|
108
108
|
prerelease: false
|
109
109
|
version_requirements: !ruby/object:Gem::Requirement
|
110
110
|
requirements:
|
111
|
-
- -
|
111
|
+
- - ~>
|
112
112
|
- !ruby/object:Gem::Version
|
113
113
|
version: '0.0'
|
114
|
-
- -
|
114
|
+
- - '>='
|
115
115
|
- !ruby/object:Gem::Version
|
116
116
|
version: 0.0.9
|
117
117
|
description: ''
|
@@ -121,7 +121,7 @@ executables: []
|
|
121
121
|
extensions: []
|
122
122
|
extra_rdoc_files: []
|
123
123
|
files:
|
124
|
-
-
|
124
|
+
- .gitignore
|
125
125
|
- Gemfile
|
126
126
|
- README.md
|
127
127
|
- Rakefile
|
@@ -166,6 +166,8 @@ files:
|
|
166
166
|
- lib/elasticated/conditions_builder.rb
|
167
167
|
- lib/elasticated/configurable.rb
|
168
168
|
- lib/elasticated/configuration.rb
|
169
|
+
- lib/elasticated/date_delimiter_factory.rb
|
170
|
+
- lib/elasticated/delimiter_visitor.rb
|
169
171
|
- lib/elasticated/delimiters/date_field_delimiter.rb
|
170
172
|
- lib/elasticated/delimiters/standard_field_delimiter.rb
|
171
173
|
- lib/elasticated/delimiters/term_field_delimiter.rb
|
@@ -195,9 +197,12 @@ files:
|
|
195
197
|
- lib/elasticated/repository/search.rb
|
196
198
|
- lib/elasticated/repository/single_page_search.rb
|
197
199
|
- lib/elasticated/results.rb
|
200
|
+
- lib/elasticated/strategy_params_for_query_service.rb
|
201
|
+
- lib/elasticated/term_delimiter_factory.rb
|
198
202
|
- lib/version.rb
|
199
203
|
- spec/aggregation_spec.rb
|
200
204
|
- spec/date_field_delimiter_spec.rb
|
205
|
+
- spec/delimiter_factory_spec.rb
|
201
206
|
- spec/document_spec.rb
|
202
207
|
- spec/elasticsearch_hit_1.json
|
203
208
|
- spec/elasticsearch_response_1.json
|
@@ -211,6 +216,7 @@ files:
|
|
211
216
|
- spec/query_spec.rb
|
212
217
|
- spec/results_spec.rb
|
213
218
|
- spec/spec_helper.rb
|
219
|
+
- spec/strategy_params_for_query_service_spec.rb
|
214
220
|
- spec/term_field_delimiter_spec.rb
|
215
221
|
homepage: http://github.com/pablo31/elasticated
|
216
222
|
licenses:
|
@@ -222,23 +228,24 @@ require_paths:
|
|
222
228
|
- lib
|
223
229
|
required_ruby_version: !ruby/object:Gem::Requirement
|
224
230
|
requirements:
|
225
|
-
- -
|
231
|
+
- - '>='
|
226
232
|
- !ruby/object:Gem::Version
|
227
233
|
version: '0'
|
228
234
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
229
235
|
requirements:
|
230
|
-
- -
|
236
|
+
- - '>='
|
231
237
|
- !ruby/object:Gem::Version
|
232
238
|
version: '0'
|
233
239
|
requirements: []
|
234
240
|
rubyforge_project:
|
235
|
-
rubygems_version: 2.
|
241
|
+
rubygems_version: 2.6.8
|
236
242
|
signing_key:
|
237
243
|
specification_version: 4
|
238
244
|
summary: Elasticsearch Wrapper, with Query & Mapping Builders
|
239
245
|
test_files:
|
240
246
|
- spec/aggregation_spec.rb
|
241
247
|
- spec/date_field_delimiter_spec.rb
|
248
|
+
- spec/delimiter_factory_spec.rb
|
242
249
|
- spec/document_spec.rb
|
243
250
|
- spec/elasticsearch_hit_1.json
|
244
251
|
- spec/elasticsearch_response_1.json
|
@@ -252,4 +259,5 @@ test_files:
|
|
252
259
|
- spec/query_spec.rb
|
253
260
|
- spec/results_spec.rb
|
254
261
|
- spec/spec_helper.rb
|
262
|
+
- spec/strategy_params_for_query_service_spec.rb
|
255
263
|
- spec/term_field_delimiter_spec.rb
|