File tree Expand file tree Collapse file tree 2 files changed +31
-31
lines changed
contents/nest/aggregations Expand file tree Collapse file tree 2 files changed +31
-31
lines changed Original file line number Diff line number Diff line change @@ -25,15 +25,15 @@ <h3 id="fluent-syntax">Fluent Syntax</h3>
2525< pre > < code > var request = new SearchRequest
2626{
2727 Query = new QueryContainer(new MatchQuery
28- {
29- Field = "country",
30- Query = "Malaysia"
31- }
32- ),
28+ {
29+ Field = "country",
30+ Query = "Malaysia"
31+ }),
3332 Aggregations = new Dictionary<string, IAggregationContainer>
3433 {
3534 { "global_bucket", new AggregationContainer
3635 {
36+ Global = new GlobalAggregator(),
3737 Aggregations = new Dictionary<string, IAggregationContainer>
3838 {
3939 { "bool_count", new AggregationContainer
@@ -55,4 +55,4 @@ <h3 id="fluent-syntax">Fluent Syntax</h3>
5555var agg = result.Aggs.Global("global_bucket");
5656var bools = agg.Terms("bool_count");
5757</ code > </ pre > < p > Refer to the < a href ="http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-bucket-global-aggregation.html "> original docs</ a > for more information.</ p >
58- </ main > </ div > < aside class ="left-sidebar "> < aside id ="menu "> < ul > < li > < h4 > < a href ="/ "> Home</ a > < a href ="/contributing.html "> Contributing</ a > < a href ="/building.html "> Building</ a > < a href ="/breaking-changes.html "> 1.0 Breaking Changes</ a > < a href ="https://github.com/elasticsearch/elasticsearch-net/releases "> Release Notes</ a > </ h4 > </ li > </ ul > < ul id ="elasticsearch-net "> < h4 class ="title "> Elasticsearch.Net</ h4 > < ul > < li > < a href ="/elasticsearch-net/quick-start.html "> Quick Start</ a > </ li > < li > < a href ="/elasticsearch-net/connecting.html "> Connecting</ a > </ li > < li > < a href ="/elasticsearch-net/security.html "> Security</ a > </ li > < li > < a href ="/elasticsearch-net/cluster-failover.html "> Cluster failover</ a > </ li > < li > < a href ="/elasticsearch-net/building-requests.html "> Building requests</ a > </ li > < li > < a href ="/elasticsearch-net/handling-responses.html "> Handling responses</ a > </ li > < li > < a href ="/elasticsearch-net/errors.html "> Errors</ a > </ li > </ ul > </ ul > < ul id ="nest "> < h4 class ="title "> NEST</ h4 > < ul > < li > < a href ="/nest/quick-start.html "> Quick Start</ a > </ li > < li > < a href ="/nest/connecting.html "> Connecting</ a > </ li > < li > < a href ="/nest/index-type-inference.html "> Type/Index Inference</ a > </ li > < li > < a href ="/nest/handling-responses.html "> Handling responses</ a > </ li > < li > < a href ="/nest/writing-queries.html "> Writing queries</ a > </ li > < li > < a href ="/nest/tips-tricks.html "> Tips & Tricks</ a > </ li > </ ul > < li > < h4 > < a href ="/nest/core/ "> < i class ="fa fa-chevron-right "> </ i > Core</ a > </ h4 > </ li > < li > < h4 > < a href ="/nest/indices/aliases.html "> < i class ="fa fa-chevron-right "> </ i > Indices</ a > </ h4 > </ li > < li > < h4 > < a href ="/nest/cluster/health.html "> < i class ="fa fa-chevron-right "> </ i > Cluster</ a > </ h4 > </ li > < li > < h4 > < a href ="/nest/search/basics.html "> < i class ="fa fa-chevron-right "> </ i > Search</ a > </ h4 > </ li > < h4 > < a href ="/nest/aggregations/handling.html "> < i class ="fa fa-chevron-down "> </ i > Aggregations</ a > </ h4 > < ul > < li class ="sub "> < a href ="/nest/aggregations/avg.html "> Avg</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/cardinality.html "> Cardinality</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/date-histogram.html "> Date Histogram</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/date-range.html "> Date Range</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/extended-stats.html "> Extended Stats</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/filter.html "> Filter</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/geo-bounds.html "> Geo Bounds</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/geo-distance.html "> Geo Distance</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/geohash-grid.html "> Geohash Grid</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/global.html " class ="selected "> Global</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/histogram.html "> Histogram</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/ipv4.html "> IPv4 Range</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/max.html "> Max</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/min.html "> Min</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/missing.html "> Missing</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/percentiles.html "> Percentiles</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/percentile-ranks.html "> Percentiles Ranks</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/range.html "> Range</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/nested.html "> Nested</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/reverse-nested.html "> Reverse Nested</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/significant-terms.html "> Significant Terms</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/stats.html "> Stats</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/sum.html "> Sum</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/terms.html "> Terms</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/top-hits.html "> Top Hits</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/value-count.html "> Value Count</ a > </ li > </ ul > < li > < h4 > < a href ="/nest/facets/handling.html "> < i class ="fa fa-chevron-right "> </ i > Facets</ a > </ h4 > </ li > </ ul > </ aside > </ aside > </ div > < footer class ="footer "> </ footer > </ div > </ body > </ html >
58+ </ main > </ div > < aside class ="left-sidebar "> < aside id ="menu "> < ul > < li > < h4 > < a href ="/ "> Home</ a > < a href ="/contributing.html "> Contributing</ a > < a href ="/building.html "> Building</ a > < a href ="/breaking-changes.html "> 1.0 Breaking Changes</ a > < a href ="https://github.com/elasticsearch/elasticsearch-net/releases "> Release Notes</ a > </ h4 > </ li > </ ul > < ul id ="elasticsearch-net "> < h4 class ="title "> Elasticsearch.Net</ h4 > < ul > < li > < a href ="/elasticsearch-net/quick-start.html "> Quick Start</ a > </ li > < li > < a href ="/elasticsearch-net/connecting.html "> Connecting</ a > </ li > < li > < a href ="/elasticsearch-net/security.html "> Security</ a > </ li > < li > < a href ="/elasticsearch-net/cluster-failover.html "> Cluster failover</ a > </ li > < li > < a href ="/elasticsearch-net/building-requests.html "> Building requests</ a > </ li > < li > < a href ="/elasticsearch-net/handling-responses.html "> Handling responses</ a > </ li > < li > < a href ="/elasticsearch-net/errors.html "> Errors</ a > </ li > </ ul > </ ul > < ul id ="nest "> < h4 class ="title "> NEST</ h4 > < ul > < li > < a href ="/nest/quick-start.html "> Quick Start</ a > </ li > < li > < a href ="/nest/connecting.html "> Connecting</ a > </ li > < li > < a href ="/nest/index-type-inference.html "> Type/Index Inference</ a > </ li > < li > < a href ="/nest/handling-responses.html "> Handling responses</ a > </ li > < li > < a href ="/nest/writing-queries.html "> Writing queries</ a > </ li > < li > < a href ="/nest/tips-tricks.html "> Tips & Tricks</ a > </ li > </ ul > < li > < h4 > < a href ="/nest/core/ "> < i class ="fa fa-chevron-right "> </ i > Core</ a > </ h4 > </ li > < li > < h4 > < a href ="/nest/indices/aliases.html "> < i class ="fa fa-chevron-right "> </ i > Indices</ a > </ h4 > </ li > < li > < h4 > < a href ="/nest/cluster/health.html "> < i class ="fa fa-chevron-right "> </ i > Cluster</ a > </ h4 > </ li > < li > < h4 > < a href ="/nest/search/basics.html "> < i class ="fa fa-chevron-right "> </ i > Search</ a > </ h4 > </ li > < h4 > < a href ="/nest/aggregations/handling.html "> < i class ="fa fa-chevron-down "> </ i > Aggregations</ a > </ h4 > < ul > < li class ="sub "> < a href ="/nest/aggregations/avg.html "> Avg</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/cardinality.html "> Cardinality</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/date-histogram.html "> Date Histogram</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/date-range.html "> Date Range</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/extended-stats.html "> Extended Stats</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/filter.html "> Filter</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/geo-bounds.html "> Geo Bounds</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/geo-distance.html "> Geo Distance</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/geohash-grid.html "> Geohash Grid</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/global.html " class ="selected "> Global</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/histogram.html "> Histogram</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/ipv4.html "> IPv4 Range</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/max.html "> Max</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/min.html "> Min</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/missing.html "> Missing</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/percentiles.html "> Percentiles</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/percentile-ranks.html "> Percentiles Ranks</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/range.html "> Range</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/nested.html "> Nested</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/reverse-nested.html "> Reverse Nested</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/significant-terms.html "> Significant Terms</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/stats.html "> Stats</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/sum.html "> Sum</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/terms.html "> Terms</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/top-hits.html "> Top Hits</ a > </ li > < li class ="sub "> < a href ="/nest/aggregations/value-count.html "> Value Count</ a > </ li > </ ul > < li > < h4 > < a href ="/nest/facets/handling.html "> < i class ="fa fa-chevron-right "> </ i > Facets</ a > </ h4 > </ li > </ ul > </ aside > </ aside > </ div > < footer class ="footer "> </ footer > </ div > </ body > </ html >
Original file line number Diff line number Diff line change @@ -37,32 +37,32 @@ Defines a single bucket of all the documents within the search execution context
3737
3838 var request = new SearchRequest
3939 {
40- Query = new QueryContainer(new MatchQuery
41- {
42- Field = "country",
43- Query = "Malaysia"
44- }
45- ),
46- Aggregations = new Dictionary<string, IAggregationContainer>
47- {
48- { "global_bucket", new AggregationContainer
49- {
50- Aggregations = new Dictionary<string, IAggregationContainer>
51- {
52- { "bool_count", new AggregationContainer
53- {
54- Terms = new TermsAggregator
55- {
56- Field = "boolValue"
57- }
58- }
59- }
60- }
61- }
62- }
63- }
40+ Query = new QueryContainer(new MatchQuery
41+ {
42+ Field = "country",
43+ Query = "Malaysia"
44+ }),
45+ Aggregations = new Dictionary<string, IAggregationContainer>
46+ {
47+ { "global_bucket", new AggregationContainer
48+ {
49+ Global = new GlobalAggregator(),
50+ Aggregations = new Dictionary<string, IAggregationContainer>
51+ {
52+ { "bool_count", new AggregationContainer
53+ {
54+ Terms = new TermsAggregator
55+ {
56+ Field = "boolValue"
57+ }
58+ }
59+ }
60+ }
61+ }
62+ }
63+ }
6464 };
65-
65+
6666 var result = client.Search<ElasticsearchProject>(request);
6767
6868 var agg = result.Aggs.Global("global_bucket");
You can’t perform that action at this time.
0 commit comments