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

0.8.0 id=-1 is returned when total count < topk #2203

Closed
sunyaofei opened this issue Apr 30, 2020 · 8 comments
Closed

0.8.0 id=-1 is returned when total count < topk #2203

sunyaofei opened this issue Apr 30, 2020 · 8 comments
Assignees
Labels
kind/bug Issues or changes related a bug kind/support Issues that users need help

Comments

@sunyaofei
Copy link

Describe the bug
for example:

  1. insert 100 record to milvus
  2. search with topk=200, i got 100 ids followed by 100 -1s, as below
[
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118200,
  1588236398893118200,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118200,
  1588236398893118200,
  1588236398893118200,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118200,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118200,
  1588236398893118000,
  1588236398893118200,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118200,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118200,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118200,
  1588236398893118200,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118200,
  1588236398893118200,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118200,
  1588236398893118200,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118200,
  1588236398893118000,
  1588236398893118000,
  1588236398893118200,
  1588236398893118200,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  1588236398893118000,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1,
  -1
]

Steps/Code to reproduce behavior
Follow this guide to craft a minimal bug report. This helps us reproduce the issue you're having and resolve the issue more quickly.

Expected behavior
just as 0.6.0, return only 100 ids

Environment details
milvus 0.8.0, java sdk

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

@sunyaofei
Copy link
Author

returned distance has the same problem

@tinkerlin
Copy link
Contributor

When the number of results is less than topk, the insufficient part will be filled with -1, which is an expected behavior.
@sunyaofei

@tinkerlin tinkerlin self-assigned this Apr 30, 2020
@tinkerlin tinkerlin added the kind/support Issues that users need help label Apr 30, 2020
@sunyaofei
Copy link
Author

When the number of results is less than topk, the insufficient part will be filled with -1, which is an expected behavior.
@sunyaofei

what is the consideration of this strategy ? why not retain the strategy as 0.6.0 ?
now we have to filter useless result with extra code

@tinkerlin
Copy link
Contributor

I have reproduced this problem. There are indeed different behaviors between 060 and 080. We are working hard to find code changes and redefine this behavior.

@JinHai-CN
Copy link
Contributor

@scsven As we discussed, this issue should be solved in SDK.

@tinkerlin tinkerlin removed their assignment May 6, 2020
@tinkerlin tinkerlin added the kind/bug Issues or changes related a bug label May 6, 2020
@sahuang
Copy link
Member

sahuang commented May 8, 2020

This has been implemented in Java SDK and will be available with Milvus 0.9.0 Release.

@fishpenguin
Copy link
Contributor

This has been implemented in Go SDK and will be available with Milvus 0.9.0 Release.

@BossZou
Copy link
Contributor

BossZou commented May 11, 2020

This issue has been implemented in python SDK.

@BossZou BossZou closed this as completed May 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Issues or changes related a bug kind/support Issues that users need help
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants