When performing queries on indices that have field names with special characters, they are not correctly mapped to the provided model.
Example index:
{
"_index" : "my-index-with-special-characters",
"_id" : "20.20.20.15",
"_score" : 1.0,
"_source" : {
"host.ip" : "20.20.20.15",
....
}
Example model:
public class myModel {
[JsonPropertyName("host.ip")]
public string HostIp { get; set; }
}
Example query:
var esAssets = ElasticAuth.Client("my-index-with-special-characters")
.Search<myModel>(s => s
.From(0)
.Size(10000)
.MatchAll()
);
There are several fields in this index that do not have the "." character that map correctly, but each one that has the dot character does no map at all.
Is there a special way this case needs to be handled?
Thank you!