Skip to content

feat: allow fetching vectors using a prefix #19

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

Merged
merged 1 commit into from
Mar 4, 2025
Merged

feat: allow fetching vectors using a prefix #19

merged 1 commit into from
Mar 4, 2025

Conversation

heyjorgedev
Copy link
Contributor

@heyjorgedev heyjorgedev commented Mar 4, 2025

This PR introduces a new way to fetch vectors using the SDK. Before you could fetch directly records from our vector database using their ids, now you can fetch them by referencing their id prefix.

<?php

use Upstash\Vector\Index;
use Upstash\Vector\VectorFetchByPrefix;

$index = new Index(...);

$results = $index->fetch(new VectorFetchByPrefix(
    prefix: 'user:',
    includeVectors: true,
));

Copy link

linear bot commented Mar 4, 2025

@CahidArda CahidArda merged commit e45d130 into master Mar 4, 2025
10 checks passed
@heyjorgedev heyjorgedev deleted the dx-1667 branch March 4, 2025 11:58
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