File tree 2 files changed +40
-0
lines changed
src/Tests/Nest.Tests.Integration
2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 182
182
<Compile Include =" Core\AsyncTests.cs" />
183
183
<Compile Include =" Mapping\MappingVisitorTests.cs" />
184
184
<Compile Include =" Mapping\GetMultipleMappingTests.cs" />
185
+ <Compile Include =" Reproduce\Reproduce1079Tests.cs" />
185
186
<Compile Include =" Reproduce\Reproduce769Tests.cs" />
186
187
<Compile Include =" Reproduce\Reproduce945Tests.cs" />
187
188
<Compile Include =" Reproduce\Reproduce953Tests.cs" />
Original file line number Diff line number Diff line change
1
+ using FluentAssertions ;
2
+ using Nest . Tests . MockData . Domain ;
3
+ using NUnit . Framework ;
4
+ using System ;
5
+ using System . Collections . Generic ;
6
+ using System . Linq ;
7
+ using System . Text ;
8
+ using System . Threading . Tasks ;
9
+
10
+ namespace Nest . Tests . Integration . Reproduce
11
+ {
12
+ [ TestFixture ]
13
+ public class Reproduce1079Tests : IntegrationTests
14
+ {
15
+ [ Test ]
16
+ public void InnerSumAggregationTest ( )
17
+ {
18
+ var response = this . Client . Search < ElasticsearchProject > ( s => s
19
+ . Aggregations ( a => a
20
+ . Histogram ( "hist" , h => h
21
+ . Field ( p => p . StartedOn )
22
+ . Interval ( 3000 )
23
+ . Aggregations ( aa => aa
24
+ . Sum ( "sizes" , sa => sa
25
+ . Field ( p => p . LongValue )
26
+ )
27
+ )
28
+ )
29
+ )
30
+ ) ;
31
+
32
+ var hist = response . Aggs . Histogram ( "hist" ) ;
33
+ foreach ( var interval in hist . Items )
34
+ {
35
+ var sizes = interval . Sum ( "sizes" ) ;
36
+ }
37
+ }
38
+ }
39
+ }
You can’t perform that action at this time.
0 commit comments