# Making search request with Nest 7.0.1 not deserialized

**URL:** <https://discuss.elastic.co/t/making-search-request-with-nest-7-0-1-not-deserialized/189193>\
**Category:** Elasticsearch\
**Created:** [July 6, 2019, 7:40am UTC](https://discuss.elastic.co/t/making-search-request-with-nest-7-0-1-not-deserialized/189193 "2019-07-06T07:40:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![terstege](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/terstege/32/49549_2.png) [@terstege](https://discuss.elastic.co/u/terstege)\
**Post date:** [July 6, 2019, 7:40am UTC](https://discuss.elastic.co/t/making-search-request-with-nest-7-0-1-not-deserialized/189193/1 "2019-07-06T07:40:12Z")

</div>

Setup:

- Elasticsearch 7.2
- [Elasticsearch.net](http://Elasticsearch.net) 7.0.1
- Elasticsearch .NEST 7.0.1

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?

---

<div class="post-metadata">

**Author:** ![terstege](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/terstege/32/49549_2.png) [@terstege](https://discuss.elastic.co/u/terstege)\
**Post date:** [July 6, 2019, 9:14am UTC](https://discuss.elastic.co/t/making-search-request-with-nest-7-0-1-not-deserialized/189193/2 "2019-07-06T09:14:14Z")

</div>

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](http://localhost:9200)"));  
var connectionSettings = new ConnectionSettings(pool, sourceSerializer: JsonNetSerializer.Default);  
var client = new ElasticClient(connectionSettings);

---

<div class="post-metadata">

**Author:** ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)\
**Post date:** [July 7, 2019, 9:53pm UTC](https://discuss.elastic.co/t/making-search-request-with-nest-7-0-1-not-deserialized/189193/3 "2019-07-07T21:53:17Z")

</div>

> [@terstege](#):
>
> To resolve this issue please add the Nuget package [NEST.JsonNetSerializer] and make a change to your connection settings:

Do you need to do this because you rely on custom [Json.NET](http://Json.NET) configuration to deserialize your document types?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 4, 2019, 9:53pm UTC](https://discuss.elastic.co/t/making-search-request-with-nest-7-0-1-not-deserialized/189193/4 "2019-08-04T21:53:18Z")

</div>

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