I finally got my Nest client set up, however, the results of every field are populated as null instead of the expected values.
I looked at these c# - ElasticSearch NEST - all fields are NULL - Stack Overflow and c# - NEST returns null instead of fields - Stack Overflow but neither was able to help me fix the issue. This is my code - super basic:
private static Nest.ConnectionSettings settings = new ConnectionSettings(new Uri("uri-link"))
.BasicAuthentication("usr", "pw")
.ClientCertificate(cert) // my pfx certificate
.DisableDirectStreaming()
.DefaultIndex("index");
var searchResponse = Event.client.Search<mdl.Event>(s => s
.From(0)
.Size(1000)
.Query(q => q
.MatchAll())));
When I add
.DefaultFieldNameInferrer(p => p);
to my connection settings, I get a new error:
An exception of type 'Elasticsearch.Net.UnexpectedElasticsearchClientException' occurred in Elasticsearch.Net.dll but was not handled in user code: 'expected:'String Begin Token', actual:'1631555771000', at offset:344'. I'm not sure what this error means or why it is happening?
All of the fields in the documents do begin with a Capital letter if that means anything.
As you can see I'm just trying to list every item in the cluster. I cannot figure out why this is returning all fields null though. Is there a problem with my connection or something? Any help is appreciated?