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

refactor: Enhance URL handling in QdrantClientConfig #93

Open
wants to merge 27 commits into
base: dev
Choose a base branch
from

Conversation

dom-liu
Copy link

@dom-liu dom-liu commented Apr 7, 2024

This commit improves the URL handling mechanism in the QdrantClientConfig's from_url function. The primary aim is to ensure that the Qdrant service URL is always fully specified, including a default port if one is not provided in the input URL. This enhancement makes the client's connection setup more robust and error-tolerant, especially in environments where the port might not be explicitly specified.

Changes include:

  • Parsing the input URL using the url crate to create a Url instance.
  • Checking for the presence of a port in the parsed URL. If absent, the default port 6334 is assigned.

These modifications ensure that the QdrantClientConfig is initialized with a complete URL, reducing the potential for runtime errors during the client's interaction with the Qdrant service.

generall and others added 27 commits September 7, 2023 13:08
* Update gRPC definitions

* Remove now obsolete Google protobuf definitions

* Add batch update methods to client

* Bump version to 1.5.0
* bump create version

* ignore intellij config file

* regen client

* update test image version

* add geo-polygon condition builder

* format example

* dependencies updates

* filter out new healcheck proto
* sync

* compile

* bump deps

* bump version

* fmt

* regen

* fix

* add convenience conversion for sparse vectors

* fix sparse vector converter

* fix sparse vector converter

* remove shard_snapshots_service

* restore version

* more conversion

* one last conversion

* Reformat

---------

Co-authored-by: timvisee <[email protected]>
* Add create and delete shard key functions

* Use more direct shard key types

* Add discovery functions

* Conversions from borrowed types into sparse vectors

* Add shard key selector parameter to all relevant API functions

* Move shard key selector parameter adjacent collection name parameter

* Update documentation example

* Add conversion helpers for shard key selector

* sync proto

* proto changes

* fix readme

---------

Co-authored-by: generall <[email protected]>
* Add `update_collection_extended`

* Update `update_collection` to `update_collection_extended`
* Bump version to 1.7.0

* Bump version to 1.7.0 in integration test
This commit improves the URL handling mechanism in the QdrantClientConfig's `from_url` function. The primary aim is to ensure that the Qdrant service URL is always fully specified, including a default port if one is not provided in the input URL. This enhancement makes the client's connection setup more robust and error-tolerant, especially in environments where the port might not be explicitly specified.

Changes include:
- Parsing the input URL using the `url` crate to create a `Url` instance.
- Checking for the presence of a port in the parsed URL. If absent, the default port 6334 is assigned.

These modifications ensure that the QdrantClientConfig is initialized with a complete URL, reducing the potential for runtime errors during the client's interaction with the Qdrant service.
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.

7 participants