File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
lib/elasticsearch/dsl/search/aggregations Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -3,18 +3,19 @@ module DSL
3
3
module Search
4
4
module Aggregations
5
5
6
- # A multi-bucket aggregation which returns the collection of terms and their document counts
6
+ # A single bucket aggregation that creates a bucket of all documents
7
+ # which are missing a value for the field
7
8
#
8
9
# @example Passing the options as a Hash
9
10
#
10
- # aggregation :tags do
11
+ # aggregation :articles_without_tags do
11
12
# missing field: 'tags'
12
13
# end
13
14
#
14
15
# @example Passing the options as a block
15
16
#
16
17
# search do
17
- # aggregation :tags do
18
+ # aggregation :articles_without_tags do
18
19
# missing do
19
20
# field 'tags'
20
21
# end
Original file line number Diff line number Diff line change 3
3
module Elasticsearch
4
4
module Test
5
5
module Aggregations
6
- class RangeTest < ::Test ::Unit ::TestCase
6
+ class MissingTest < ::Test ::Unit ::TestCase
7
7
include Elasticsearch ::DSL ::Search ::Aggregations
8
8
9
9
context "Missing aggregation" do
@@ -14,8 +14,8 @@ class RangeTest < ::Test::Unit::TestCase
14
14
end
15
15
16
16
should "take a Hash" do
17
- subject = Missing . new ( { field : 'test ' } )
18
- assert_equal ( { missing : { field : "test " } } , subject . to_hash )
17
+ subject = Missing . new ( { field : 'foo ' } )
18
+ assert_equal ( { missing : { field : "foo " } } , subject . to_hash )
19
19
end
20
20
21
21
should "have option methods" do
You can’t perform that action at this time.
0 commit comments