Skip to content

Fix Qdrant vector store id type #262 #264

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

Open
wants to merge 2 commits into
base: 1.x
Choose a base branch
from

Conversation

nextmwa
Copy link

@nextmwa nextmwa commented Aug 14, 2025

• Removed previous dependency on ramsey/uuid
• Added optional parameter for document ID type in the Document object constructor
• Added private method for generating UUID v4 internally within the Document class

Add int and uuid v4 type into Document constructor, default remain uniqid
@ilvalerione
Copy link
Member

ilvalerione commented Aug 16, 2025

I think keeping only the INT strategy is the best. Documents are created inside data loaders so you typically don't have the chance to pass the id type. Integer should be compatible with all databases.

But extracting a random int does not guarantee uniqueness. Don't you think microtime(true)*10000 should solve the problem?

public function generateId(): int
{
    return microtime(true)*10000;
}

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