-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sort.toJSON() wrong format!? #118
Comments
Okay thanks. So this is a Bug in the Elasticsearch.Net/NEST Client. Because the generated Syntax forces the RequestResponseSerializer.Deserialize() to fail with the message: "Character: { expected." If I change the JSON from ESB the Deserialize works. |
NEST now supports deserializing the short forms of sort in 7.8.1 (elastic/elasticsearch-net#4806). Historically, NEST has generally only supported serializing and deserializing the long form of sort/queries/etc., but in more recent versions, support for deserializing short forms has been added where it is missing (serialization will still use the long form). So, if you come across a case where NEST does not deserialize the short form of something, please do open an issue, thanks! |
let sortField = new Sort('MyFieldToSort', 'desc');
sortField.toJSON()
Result:
{ MyFieldToSort: 'desc' }
Expected result:
{ "MyFieldToSort": { "order": "desc" } }
The text was updated successfully, but these errors were encountered: