Making search request with Nest 7.0.1 not deserialized

Setup:

Code:
var result = IndexClient.Search(s => s
.MinScore(minimumScore)
.From(skip)
.Size(take)
.Index(index)
.Query(q => searchQuery)
);

When executing and taking a look at the debug information, I can see the request is ok and also a result/document is returned. Looking at the at the result.Documents I get the same amount of documents returned, but the documents are empty (default values), like deserialization is gone wrong.

I'm comming from Elasticsearch 5.6, were all worked fine.

Any suggestions?

To resolve this issue please add the Nuget package [ NEST.JsonNetSerializer] and make a change to your connection settings:

var pool = new SingleNodeConnectionPool(new Uri("http://localhost:9200"));
var connectionSettings = new ConnectionSettings(pool, sourceSerializer: JsonNetSerializer.Default);
var client = new ElasticClient(connectionSettings);

Do you need to do this because you rely on custom Json.NET configuration to deserialize your document types?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.