-
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
feat: Implement new api for nested sorting for elasticsearch >= 6.1 #71
Conversation
Since the options are only deprecated, I am leaning towards not making this breaking change for now. But I think a better system is required for managing compatibility with different versions of elasticsearch. For now, how about the compromise of only adding the |
@dimatill could you please update PR with requested changes? Thanks |
Sounds good! Will update |
@dimatill While you are making the changes, also add some documentation notes for the following:
|
@sudo-suhas updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please oblige the minor change requests for docs?
On a side note, having to maintain docs in 2 places is not ideal. Maybe I should do a rewrite using typescript?
Thank you @dimatill for the PR 👍 The changes have been published in |
Thank you, @sudo-suhas |
Thank you @sudo-suhas |
Hello, Thx for the amazing work! |
@pierremalletneo9 multiple nested sort should work
this code produces such output:
|
Thank you @dimatill for taking the time to answer. I appreciate it. |
Wow thanks for the fast answer @dimatill . It works fine with your solution. Its just that the typescript definition does not allow sub nested.
|
Adds compatibility of new
nested
api for elasticsearch >= 6.1Removes deprecated
nested_path
andnested_filter
options.https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-request-sort.html#nested-sorting
WARNING: This is breaking change and this will NOT work with elasticsearch < 6.1
Usage example:
or with old style:
both examples produce the same output compatible with new elasticsearch api: