This is a follow up question for another post which I had asked (and been answer) how to build a unit test to a specific query in ElasticSearch using Nest (in c#). this is a code sample from the answer which I was given in which I build an expected query for "normal" tags:
var expected = new
{
query = new {
@bool = new {
must = new object[] {
new {
@bool = new {
should = new object[] {
new {
match = new {
title = new {
query = "Kibana"
}
}
},
new {
match = new {
title = new {
query = "Elasticsearch",
boost = 2d
}
}
}
},
}
},
new {
@bool = new {
filter = new [] {
new {
range = new {
score = new {
gt = 0d
}
}
}
}
}
}
}
}
}
};
I didn't managed to turn one of those tags into a nested one. i.e. field.title
In my tested query object I created this property using JsonProperty
in the following way:
[JsonProperty(PropertyName = "field.title")]
public object { get; set; }
but I didn't mange to do something similar in my unit test to 'mock' his creation. Any help will be deeply appreciated.