File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
src/Tests/Nest.Tests.Integration/Aggregations Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ using System . Linq ;
2+ using Elasticsearch . Net ;
3+ using FluentAssertions ;
4+ using Nest . Tests . MockData . Domain ;
5+ using NUnit . Framework ;
6+
7+ namespace Nest . Tests . Integration . Aggregations
8+ {
9+ [ TestFixture ]
10+ public class NestedBucketAggregationTests : IntegrationTests
11+ {
12+ [ Test ]
13+ public void Terms ( )
14+ {
15+ var results = this . _client . Search < ElasticsearchProject > ( s=> s
16+ . Size ( 0 )
17+ . Aggregations ( a=> a
18+ . Nested ( "followers" , n=> n
19+ . Aggregations ( t=> t
20+ . Terms ( "bucket_agg" , m=> m . Field ( p=> p . Country ) )
21+ )
22+ )
23+ )
24+ ) ;
25+ results . IsValid . Should ( ) . BeTrue ( ) ;
26+ var bucket = results . Aggs . Terms ( "bucket_agg" ) ;
27+ bucket . Items . Should ( ) . NotBeEmpty ( ) ;
28+ }
29+
30+ }
31+ }
You can’t perform that action at this time.
0 commit comments