Need to mock elastic search Nest object

var obj = service.Search(new student().Query());
var Name= obj.Aggs.Terms("Name");

I did quick watch in vs2017 and try to create the Nest library object but getting error while assigning the value to Aggregate property .

new Nest.KeyedBucket
{
Key="XYZ school",
KeyAsString=null,
Aggregations=new Dictionary<string, IAggregationContainer>{}
}
Aggregations is protected internal property which not allowing me to assign value to it..

Hi,

Please:
1°/ Expose your problem
2°/ Format your code
3°/ Give your versions
4°/ Say "hi", "thanks" and "bye"

bye,
Xavier

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.