when retrieving documents with NEST with this code:
var result = elk.Search<FileBeatDto>(x => x .Index("filebeat-*") .AllIndices() .Type(type) .Query(q => q.Match(qs => qs.Field("fields.asset_tag").Query(asset_tag)) && q.Match(qs => qs.Field("message").Query(filter)) ) .Take(lines) );
I get documents but the timestamp is always null.
This is FilebeatDto:
public class FileBeatDto { public DateTime timestamp { get; set; } public string datetime { get; set; } public DateTime received_at { get; set; } public int offset { get; set; } public string version { get; set; } public string input_type { get; set; } public int count { get; set; } public Beat beat { get; set; } public string host { get; set; } public string source { get; set; } public string message { get; set; } public string type { get; set; } public object fields { get; set; } public List<string> tags { get; set; } }
Any idea why timestamp is null? I tried with @timestamp and timestamp.