-
Notifications
You must be signed in to change notification settings - Fork 124
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
[BUG] <title> SortCombinations typings lacking interfaces/types #850
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I have a project where I'm converting from elasticsearch to opensearch, on a node/express server. (npm v @opensearch-project/[email protected] )
I am noticing some (potential?) issues with the typings in this package, specifically the sort:
sortQuery:
my sortQuery func needs to return a SortCombinations compliant type object. In elasticsearch, the SortCombinations accomodates sorting by the field name with the SortOptions type like so:
es typings:
BUT, when we see the similar sort typings in os, it lacks the SortOptions of [property: string]: FieldSort | SortOrder | etc, etc. which allows the correct typings to be recognized for sorting by field names.
When using my own 'incorrectly' typed code it works perfectly fine to sort the opensearch results despite what the typings show , and in the opensearch docs it shows the functionality as one would expect:
Related component
Search
To Reproduce
Expected behavior
typings should include field name sorting.
Additional Details
No response
The text was updated successfully, but these errors were encountered: