Problems using Elastic Search 7.0.1 with Nest

Hi all,

I am using ElasticSearch 7.0.1 and Nest 6.6.0. During a multi match query I am getting the next error:

Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Int64' because the type requires a JSON primitive value (e.g. string, number, boolean, null) to deserialize correctly.\r\nTo fix this error either change the JSON to a JSON primitive value (e.g. string, number, boolean, null) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.\r\nPath '', line 1, position 193.

I used this query in the version ES 6.2.0 and works fine, but upgrading to 7.0.1 cause that error.

This is my POCO:

public class _doc
        public string Id { get; set; }
        public string Name { get; set; }
        public string ShortName { get; set; }
        public string Type { get; set; }
        public string DocId { get; set; }

public static class QueryDescriptor{
public static ISearchRequest() {
.Scroll(new Time(1000))
.Query(q => q
.MultiMatch(m => m
.Fields(f => f
.Field(f1 => f1.Name)
.Field(f2 => f2.ShortName))
.Sort(s => s.Descending(SortSpecialField.Score)) ;

NEST 6.6.0 is not compatible with Elasticsearch 7.x. Major versions of the client are compatible with major versions of Elasticsearch, so you'll want to use NEST 7.x with Elasticsearch 7.x.

We're working hard to finish up NEST 7.x for GA release, but have a 7.0.0-alpha1 prerelease available on Nuget that is compatible with Elasticsearch 7.x.

Thanks, I will try with the alpha version.
Do you have a approximate release date for the new version of NEST?

I don't, I'm afraid. Suffice it to say we are working hard on it, to release as soon as it is ready :slight_smile:

Ok, thank you for the infomation :slight_smile:

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