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

VS-284: Add Bindings support for Vectorize queryById operation #2941

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

garvit-gupta
Copy link
Contributor

Add a new Vectorize operation for Bindings: queryById() that allows users to query their index using a vector already present in the index.

if (this.indexVersion === 'v1') {
throw new Error(`QueryById operation is not supported for v1 indexes.`);
} else {
if (options?.returnMetadata) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we factor out this duplicate code between query() and queryById()? Something like a queryImpl() that accepts an object that contains either a vector or vectorId field, then spreads the object into the body.

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.

3 participants