Skip to content
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

DocumentArray sort should also get top_k to allow for more efficient sorting #3467

Open
JoanFM opened this issue Sep 23, 2021 · 5 comments
Open

Comments

@JoanFM
Copy link
Member

@JoanFM JoanFM commented Sep 23, 2021

Describe the feature
Right now sort is done on all the Document collection, I would like to sort only up to a top_k.

@sauravgarg540
Copy link
Contributor

@sauravgarg540 sauravgarg540 commented Sep 23, 2021

Hey @JoanFM, I would like to work on this issue.

@JoanFM
Copy link
Member Author

@JoanFM JoanFM commented Sep 23, 2021

Sure @sauravgarg540 ! Just ask if u need any help!

@sauravgarg540
Copy link
Contributor

@sauravgarg540 sauravgarg540 commented Sep 23, 2021

Hey @JoanFM, I have drafted a PR. Waiting for your feedback.

@sauravgarg540
Copy link
Contributor

@sauravgarg540 sauravgarg540 commented Sep 29, 2021

Hey @JoanFM, I have a doubt regarding the aim of this issue, it would be great if you can clarfy it for me

  • while sorting in ascending order, the implementation should get the top_k smallest values sort them and keep it at the top while the rest of the list may not be sorted.

Did I get the issue right?

@JoanFM
Copy link
Member Author

@JoanFM JoanFM commented Sep 29, 2021

Yes, this is the idea, and for descending it applies the other way around

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants