arelastic 3.3.2 → 3.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2795d56fffdc0a61f805e08103f757e3d9d6733e494cb6f6483439b105fc23e4
4
- data.tar.gz: 7812934cd5319e2404c80fd55fbfdccf5fed51c951c3f4a2659624772b668514
3
+ metadata.gz: d8edfdb17e46c6148893fd8ae238a07c4743359a9c5e4955b424649727196ff8
4
+ data.tar.gz: 3c5c40a1d08cbf850a096b0d72b675c4d63e692d9b55d0b123792e68904a1aa9
5
5
  SHA512:
6
- metadata.gz: c5d90ef13123ff1a5eb7e03b7abd2839767697b6cf6905932eafc08fed5e92423da48f7b2111b82633514fea062563d658a60a06e110a7673474aa9145357f20
7
- data.tar.gz: 7ae6737a2b74e4081d8a4202a7c01e7e10d8b037cb3b4b238dbf4602faa8a2b55e0e49b143ceb0e2df80de02cf831be15f69bdb183c1ea95dfd71b25c6bb780f
6
+ metadata.gz: eb01a6abd4f16c130a8759a53d40582698221b11e58178ec49297be9cacf03e87bc2cd666a1076480b65a264968b1ef539d9888aaa3416ad4474617f98de5613
7
+ data.tar.gz: 20ae0b0240d1b2d439b08d6dbb38576687f7a5d3c2c5bc4bafb018625f5f35b6662e0fd9f62e45b9264ace1c8164ab4e71f68e696100509ccbff83b14af79e26
@@ -0,0 +1,13 @@
1
+ module Arelastic
2
+ module Aggregations
3
+ class Children < Arelastic::Aggregations::SpecialSingleBucket
4
+ def aggregation_name
5
+ 'children'
6
+ end
7
+
8
+ def specification_key
9
+ 'type'
10
+ end
11
+ end
12
+ end
13
+ end
@@ -1,15 +1,12 @@
1
1
  module Arelastic
2
2
  module Aggregations
3
- class Nested < Arelastic::Aggregations::Bucket
4
- attr_accessor :path
5
-
6
- def initialize(name, path, aggs)
7
- super name, aggs: aggs
8
- @path = path
3
+ class Nested < Arelastic::Aggregations::SpecialSingleBucket
4
+ def aggregation_name
5
+ 'nested'
9
6
  end
10
7
 
11
- def as_elastic_aggregation
12
- {"nested" => { "path" => path }}.merge(super)
8
+ def specification_key
9
+ 'path'
13
10
  end
14
11
  end
15
12
  end
@@ -0,0 +1,13 @@
1
+ module Arelastic
2
+ module Aggregations
3
+ class Parent < Arelastic::Aggregations::SpecialSingleBucket
4
+ def aggregation_name
5
+ 'parent'
6
+ end
7
+
8
+ def specification_key
9
+ 'type'
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,16 @@
1
+ module Arelastic
2
+ module Aggregations
3
+ class SpecialSingleBucket < Arelastic::Aggregations::Bucket
4
+ attr_accessor :specification
5
+
6
+ def initialize(name, specification, aggs)
7
+ super name, aggs: aggs
8
+ @specification = specification
9
+ end
10
+
11
+ def as_elastic_aggregation
12
+ { aggregation_name => { specification_key => specification } }.merge(super)
13
+ end
14
+ end
15
+ end
16
+ end
@@ -1,9 +1,11 @@
1
1
  require 'arelastic/aggregations/aggregation'
2
2
  require 'arelastic/aggregations/bucket'
3
+ require 'arelastic/aggregations/special_single_bucket'
3
4
 
4
5
  require 'arelastic/aggregations/bucket_sort'
5
6
  require 'arelastic/aggregations/bucket_selector'
6
7
  require 'arelastic/aggregations/cardinality'
8
+ require 'arelastic/aggregations/children'
7
9
  require 'arelastic/aggregations/date_histogram'
8
10
  require 'arelastic/aggregations/filter'
9
11
  require 'arelastic/aggregations/filters'
@@ -11,6 +13,7 @@ require 'arelastic/aggregations/histogram'
11
13
  require 'arelastic/aggregations/min'
12
14
  require 'arelastic/aggregations/missing'
13
15
  require 'arelastic/aggregations/nested'
16
+ require 'arelastic/aggregations/parent'
14
17
  require 'arelastic/aggregations/range'
15
18
  require 'arelastic/aggregations/reverse_nested'
16
19
  require 'arelastic/aggregations/sampler'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arelastic
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.2
4
+ version: 3.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Higgins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-09 00:00:00.000000000 Z
11
+ date: 2022-04-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Build Elastic Search queries with objects
14
14
  email: developer@matthewhiggins.com
@@ -25,6 +25,7 @@ files:
25
25
  - lib/arelastic/aggregations/bucket_selector.rb
26
26
  - lib/arelastic/aggregations/bucket_sort.rb
27
27
  - lib/arelastic/aggregations/cardinality.rb
28
+ - lib/arelastic/aggregations/children.rb
28
29
  - lib/arelastic/aggregations/date_histogram.rb
29
30
  - lib/arelastic/aggregations/filter.rb
30
31
  - lib/arelastic/aggregations/filters.rb
@@ -32,9 +33,11 @@ files:
32
33
  - lib/arelastic/aggregations/min.rb
33
34
  - lib/arelastic/aggregations/missing.rb
34
35
  - lib/arelastic/aggregations/nested.rb
36
+ - lib/arelastic/aggregations/parent.rb
35
37
  - lib/arelastic/aggregations/range.rb
36
38
  - lib/arelastic/aggregations/reverse_nested.rb
37
39
  - lib/arelastic/aggregations/sampler.rb
40
+ - lib/arelastic/aggregations/special_single_bucket.rb
38
41
  - lib/arelastic/aggregations/sum.rb
39
42
  - lib/arelastic/aggregations/terms.rb
40
43
  - lib/arelastic/aggregations/value_count.rb