# Elasticsearch .NET 7.1.0 issue

**URL:** <https://discuss.elastic.co/t/elasticsearch-net-7-1-0-issue/193674>\
**Category:** Elasticsearch\
**Created:** [August 4, 2019, 12:04pm UTC](https://discuss.elastic.co/t/elasticsearch-net-7-1-0-issue/193674 "2019-08-04T12:04:10Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![roman.pavliuk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/roman.pavliuk/32/82638_2.png) [@roman.pavliuk](https://discuss.elastic.co/u/roman.pavliuk)\
**Post date:** [August 4, 2019, 12:04pm UTC](https://discuss.elastic.co/t/elasticsearch-net-7-1-0-issue/193674/1 "2019-08-04T12:04:11Z")

</div>

I have updated my project into last elasticsearch version. But after this, when I trying to get data from my elastic, I have next exception. My nugets: [Elasticsearch.Net](http://Elasticsearch.Net) v7.1.0, NEST 7.1.0 Before update, when I using 6.7.0 elastic, I haven't got this issue.

1. When I trying to get 900 elements, it works good.
2. When I trying to get more than 1000, have this exception.
3. I have set "max\_result\_window" : 500000

`Exception has occurred: CLR/Elasticsearch.Net.UnexpectedElasticsearchClientException An exception of type 'Elasticsearch.Net.UnexpectedElasticsearchClientException' occurred in System.Private.CoreLib.dll but was not handled in user code: 'expected:'Number Token', actual:'null', at offset:169' Inner exceptions found, see $exception in variables window for more details. Innermost exception Elasticsearch.Net.Utf8Json.JsonParsingException : expected:'Number Token', actual:'null', at offset:169`

Any ideas?

---

<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:** [August 4, 2019, 11:11pm UTC](https://discuss.elastic.co/t/elasticsearch-net-7-1-0-issue/193674/2 "2019-08-04T23:11:17Z")

</div>

[Elasticsearch.Net and NEST 7.1.0 are only compatible with Elasticsearch 7.x](https://github.com/elastic/elasticsearch-net#compatibility-matrix), so if you're using Elasticsearch 6.x, you should use the latest [Elasticsearch.Net](http://Elasticsearch.Net) and NEST 6.x, which at this time is [6.8.1](https://www.nuget.org/packages/NEST/6.8.1).

The issue is that somewhere in the response, a value is expected to be a numeric value, but is in fact `null`. The serializer in 7.x is much faster than in 6.x, however it is stricter. If you can provide further details about versions used and the actual JSON response, I may be able to help further.

---

<div class="post-metadata">

**Author:** ![roman.pavliuk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/roman.pavliuk/32/82638_2.png) [@roman.pavliuk](https://discuss.elastic.co/u/roman.pavliuk)\
**Post date:** [August 5, 2019, 5:37am UTC](https://discuss.elastic.co/t/elasticsearch-net-7-1-0-issue/193674/3 "2019-08-05T05:37:37Z")

</div>

I have updated my project to the last version of Elasticsearch .net(7.x) and NEST(7.x).  
If I try to get from elastci 100 elements, it works good. The same from Elastic dev tool. My query works from Elastic Dev tool with 10000 elements, but it doesn't works from my application.  
My response is error, which I added.

---

<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:** [August 5, 2019, 5:40am UTC](https://discuss.elastic.co/t/elasticsearch-net-7-1-0-issue/193674/4 "2019-08-05T05:40:04Z")

</div>

What version of Elasticsearch are you targeting?

---

<div class="post-metadata">

**Author:** ![roman.pavliuk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/roman.pavliuk/32/82638_2.png) [@roman.pavliuk](https://discuss.elastic.co/u/roman.pavliuk)\
**Post date:** [August 5, 2019, 6:05am UTC](https://discuss.elastic.co/t/elasticsearch-net-7-1-0-issue/193674/5 "2019-08-05T06:05:02Z")

</div>

Im using [Elasticsearch.NET](http://Elasticsearch.NET) 7.0.1

---

<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:** [August 5, 2019, 6:08am UTC](https://discuss.elastic.co/t/elasticsearch-net-7-1-0-issue/193674/6 "2019-08-05T06:08:06Z")

</div>

> [@roman.pavliuk](#):
>
> Im using [Elasticsearch.NET](http://Elasticsearch.NET) 7.0.1

Is that Elasticsearch **Server** , or the **.NET Client**? What Elasticsearch **Server** are you using?

---

<div class="post-metadata">

**Author:** ![roman.pavliuk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/roman.pavliuk/32/82638_2.png) [@roman.pavliuk](https://discuss.elastic.co/u/roman.pavliuk)\
**Post date:** [August 5, 2019, 6:21am UTC](https://discuss.elastic.co/t/elasticsearch-net-7-1-0-issue/193674/7 "2019-08-05T06:21:25Z")

</div>

Im using 7.1.1 server version

---

<div class="post-metadata">

**Author:** ![roman.pavliuk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/roman.pavliuk/32/82638_2.png) [@roman.pavliuk](https://discuss.elastic.co/u/roman.pavliuk)\
**Post date:** [August 5, 2019, 6:30am UTC](https://discuss.elastic.co/t/elasticsearch-net-7-1-0-issue/193674/8 "2019-08-05T06:30:35Z")

</div>

I trying with take = 100, my query works good. If I set = 1000, that exception.

---

<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:** [August 5, 2019, 6:47am UTC](https://discuss.elastic.co/t/elasticsearch-net-7-1-0-issue/193674/9 "2019-08-05T06:47:17Z")

</div>

Please provide

1. the C# POCOs that represent the documents in Elasticsearch
2. the response that throws the exception, with any necessary redactions

The exception does indicate what offset in the response has an issue

> [@roman.pavliuk](#):
>
> 'expected:'Number Token', actual:'null', at offset:169'

---

<div class="post-metadata">

**Author:** ![roman.pavliuk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/roman.pavliuk/32/82638_2.png) [@roman.pavliuk](https://discuss.elastic.co/u/roman.pavliuk)\
**Post date:** [August 5, 2019, 7:11am UTC](https://discuss.elastic.co/t/elasticsearch-net-7-1-0-issue/193674/10 "2019-08-05T07:11:30Z")

</div>

I have found issue!I have 2 fields with int type. And in 6.x version, this fields was 0 by default. But for now new version can't parse it, only if fields nullable. Thanks for help!

---

<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:** [September 2, 2019, 7:18am UTC](https://discuss.elastic.co/t/elasticsearch-net-7-1-0-issue/193674/11 "2019-09-02T07:18:31Z")

</div>

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