File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed
src/Tests/Nest.Tests.Unit/Search/Aggregations/Terms Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "field" : " country" ,
3+ "min_doc_count" : 1 ,
4+ "execution_hint" : " global_ordinals_low_cardinality" ,
5+ "order" : {
6+ "_count" : " asc"
7+ },
8+ "collect_mode" : " breadth_first"
9+ }
Original file line number Diff line number Diff line change 1+ using System . Reflection ;
2+ using Nest . Tests . MockData . Domain ;
3+ using NUnit . Framework ;
4+
5+ namespace Nest . Tests . Unit . Search . Aggregations . Terms
6+ {
7+ [ TestFixture ]
8+ public class TermAggregationTests : BaseJsonTests
9+ {
10+ [ Test ]
11+ public void TermAggregationSerializes ( )
12+ {
13+ var s = new TermsAggregationDescriptor < ElasticsearchProject > ( )
14+ . CollectMode ( TermsAggregationCollectMode . BreadthFirst )
15+ . ExecutionHint ( TermsAggregationExecutionHint . GlobalOrdinalsLowCardinality )
16+ . Field ( p => p . Country )
17+ . MinimumDocumentCount ( 1 )
18+ . OrderAscending ( "_count" ) ;
19+
20+ this . JsonEquals ( s , MethodBase . GetCurrentMethod ( ) ) ;
21+ }
22+ }
23+ }
You can’t perform that action at this time.
0 commit comments