-
Notifications
You must be signed in to change notification settings - Fork 122
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
Fix grpc payload index params #773
Conversation
✅ Deploy Preview for poetic-froyo-8baba7 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
client.create_payload_index(COLLECTION_NAME, "bool", models.PayloadSchemaType.BOOL) | ||
client.create_payload_index(COLLECTION_NAME, "datetime", models.PayloadSchemaType.DATETIME) | ||
client.create_payload_index( | ||
COLLECTION_NAME, "keyword", models.PayloadSchemaType.KEYWORD, wait=True |
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.
I assume all these wait=true
are added now because of the new non-blocking payload index creation 👍
if prefer_grpc: | ||
rest_client = QdrantClient() | ||
_ = rest_client.get_collection(COLLECTION_NAME).payload_schema | ||
payload_schema = client.get_collection(COLLECTION_NAME).payload_schema | ||
assert payload_schema["integer_parametrized"].params.lookup is True | ||
assert payload_schema["integer_parametrized"].params.range is False | ||
assert payload_schema["integer_parametrized"].params.is_principal is False | ||
assert payload_schema["integer_parametrized"].params.on_disk is True |
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.
Just discussed this part in chat:
This is being asserted against the results of rest client, because this is the kind of behavior that would fail before. So this is in the spirit of a regression test.
* fix: update grpc parametrized payload index * fix: optional lookup and range for integer payload index * tests: add tests * fix: remove updates which are too early for the time * chore: add newline
grpc client used to ignore such params as on_disk and is_tenant for parametrized payload indices, only rest client worked
Integer payload index params such as lookup and range used to be mandatory in rest, however, grpc could omit those params.
This behaviour was leading to an exception, when one tried to get collection info via a rest client for a collection with payload indices created via grpc client