Hello,
I am pretty new to working with Elasticsearch. Right now I am trying to query some data from Elastic 6.5 with .net client NEST.
So I have existing index that I want to search In. I tried to create the C# class myself or with auto-generator QuickType.
Unfortunatelly with both approaches I can have something come back from Elastic but it never gets mapped on the properties it should.
I can get back 10 hits but most of the parameters are null except Counts and ID which match to the document ID in elastic.
So from that I know my configuration and connection works fine. But i think that the problem is with my class that is most likely bad.
When i open the JSON of document in Kibana it looks like this (some of the data is deleted):
{
"_index": "",
"_type": "_doc",
"_id": "B1wPn3ABHLnBb2g1j46j",
"_version": 1,
"_score": null,
"_source": {
"some_identifier": "[ner#3-44-C-1] ",
"severity": "",
"matching_rule": "",
"escalation_type": "INCIDENT",
"contractId": "null",
"sid": "",
"@timestamp": "2020-03-03T06:22:41.980Z",
"escalation_time": "07:22:41.100",
"@version": "1",
"message": "",
"parameters": "",
"userId": "null",
"host": "",
"path": "/srv/log/"
},
"fields": {
"@timestamp": [
"2020-03-03T06:22:41.980Z"
]
},
"sort": [
1583216561980
]
}
How should I create the class so it works?