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

Fix grpc payload index params #773

Merged
merged 5 commits into from
Sep 13, 2024
Merged

Fix grpc payload index params #773

merged 5 commits into from
Sep 13, 2024

Conversation

joein
Copy link
Member

@joein joein commented Sep 13, 2024

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

Copy link

netlify bot commented Sep 13, 2024

Deploy Preview for poetic-froyo-8baba7 ready!

Name Link
🔨 Latest commit 5d17bbe
🔍 Latest deploy log https://app.netlify.com/sites/poetic-froyo-8baba7/deploys/66e4534930cd900008ad6439
😎 Deploy Preview https://deploy-preview-773--poetic-froyo-8baba7.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@joein joein requested a review from coszio September 13, 2024 15:19
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
Copy link
Contributor

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 👍

Comment on lines +2196 to +2203
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
Copy link
Contributor

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.

@joein joein merged commit 2bd4f7a into dev Sep 13, 2024
14 checks passed
joein added a commit that referenced this pull request Sep 16, 2024
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants