spring-ai
spring-ai copied to clipboard
Why Qdrant generated ID policy must be UUID
Please do a quick search on GitHub issues first, there might be already a duplicate issue for the one you are about to create. If the bug is trivial, just go ahead and create the issue. Otherwise, please take a few moments and fill in the following sections:
Bug description A clear and concise description of what the bug is about. Why Qdrant generated ID policy must be UUID Environment Please provide as many details as possible: Spring AI version, Java version, which vector store you use if any, etc 0.8.1 Steps to reproduce Steps to reproduce the issue.
Expected behavior A clear and concise description of what you expected to happen.
Minimal Complete Reproducible example Please provide a failing test or a minimal complete verifiable example that reproduces the issue. Bug reports that are reproducible will take priority in resolution over reports that are not reproducible.
Qdrant only allows UUIDs and +ve integers as point IDs. https://qdrant.tech/documentation/concepts/points/#point-ids
Qdrant only allows UUIDs and +ve integers as point IDs. https://qdrant.tech/documentation/concepts/points/#point-ids
so why only support one?I think support all. Id is also need.can I try and commit PR?
Could you please explain? I didn't get what you meant.
Could you please explain? I didn't get what you meant.
I want to use number as IDs, but i find no way
Right.
At the time, if I remember correctly, the interface restricted IDs to strings. So, only UUIDs(String) were supported.
Right.
At the time, if I remember correctly, the interface restricted IDs to strings. So, only UUIDs(String) were supported.
Can support number in the future?Or can I modify code to support it?
Contributions are always accepted if they add value.
@Anush008 the Document id must be String ,I don't feel good expanding
Yeah, that was the interface we had to work with.
@tzolov Do you have a better suggetion?
Hi @lifejwang11 , can't you just convert the int ID into a String? Maybe I'm not seeing the reasons why this won't be sufficient?
@tzolov, it's because of https://github.com/spring-projects/spring-ai/issues/602#issuecomment-2067601369
This seems to be as simple as ensuring that the String IDs you use for Documents are supported by your vector store of choice.
A way to fail fast would be to check in the QdrantVectorStore implementation that the provided String matches the expected format. If you would like to contribute a PR with tests for thist lifejwang11 it would be appreciated.
Thanks for raising the issue.
This seems to be as simple as ensuring that the String IDs you use for Documents are supported by your vector store of choice.
A way to fail fast would be to check in the QdrantVectorStore implementation that the provided String matches the expected format. If you would like to contribute a PR with tests for thist lifejwang11 it would be appreciated.
Thanks for raising the issue.
Do you mean turn numbers into strings?