Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

elasticsearch nested aggregation in c#

var aggs = new AggregationDictionary()
{
    {
        "countries_step1",
        new NestedAggregation("countries_step1")
        {
            Path = "country",
            Aggregations = new AggregationDictionary()
            {
                {
                    "countries_step2",
                    new FilterAggregation("countries_step2")
                    {
                        Filter = new BoolQuery
                        {
                            Must = new QueryContainer[]
                            {
                                new TermQuery
                                {
                                    Field = "country.isDisplayed",
                                    Value = true
                                }
                            }
                        },
                        Aggregations = new AggregationDictionary
                        {
                            {
                                "countries_step3",
                                new TermsAggregation("countries_step3")
                                {
                                    Field = "country.displayName.keyword",
                                    Size = 9999
                                }
                            }
                        }
                    }
                }
            }
        }
    }
};
Comment

PREVIOUS NEXT
Code Example
Csharp :: hashtable in c# 
Csharp :: HttpClient .net Core add Certificate 
Csharp :: oauth API with the Access Token to retrieve some of users information. 
Csharp :: why to make private fields readonly in c# 
Csharp :: c# define array 
Csharp :: c# return values 
Csharp :: instantiate object inside of object Unity 
Csharp :: delete selected cells in Datagridview 
Csharp :: c# distinct comparer multiple properties 
Csharp :: *ngif vs ngif 
Csharp :: math.pow in C# using loop 
Csharp :: action delegate c# 
Csharp :: c# out argument 
Csharp :: access denied tring to save a file uwp xamarin 
Csharp :: How to find column name with column index in DataGridView 
Csharp :: vb.net read registry key as string 
Csharp :: mock async method c# reutrnd 
Csharp :: Count Rows of table using Linq 
Csharp :: read only variable in c# 
Csharp :: c# linq sorting sequential guids 
Csharp :: DisplayUnitType revit api 
Csharp :: visual studio 2019 problem create new .net framework class library 
Csharp :: C# Action Delegate 
Csharp :: c# disable docking sub member in panel 
Csharp :: get datacontext of itemscontrol item c# 
Csharp :: crystal report error webconfig reference 
Csharp :: Event that fires during DataGridViewComboBoxColumn SelectedIndexChanged 
Csharp :: c# if combobox selected index 
Csharp :: stuck.hypixel.net ip 
Csharp :: open html file in browser using c++ 
ADD CONTENT
Topic
Content
Source link
Name
9+8 =