Skip to content

Get by ids #25

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 4 commits into
base: main
Choose a base branch
from
Open

Get by ids #25

wants to merge 4 commits into from

Conversation

eljandoubi
Copy link

I have implemented the get_by_ids method in the VectorStore class, along with its unit and integration tests. @bsbodden @efriis @tylerhutcherson @baskaryan @ccurme

@bsbodden bsbodden requested review from tylerhutcherson and bsbodden and removed request for tylerhutcherson November 20, 2024 20:09

result_docs = []
for key in ids:
doc_dict = self.index.client.hgetall(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should use a pipeline operation for this with transaciton=False

Copy link
Author

Choose a reason for hiding this comment

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

@tylerhutcherson What do you think about these changes?

Copy link
Collaborator

@bsbodden bsbodden left a comment

Choose a reason for hiding this comment

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

See my comment for the differences between IDs and Keys. Thanks for contributing.

# Create a unique index name for testing
index_name = f"test_index_{str(ULID())}"

texts = ["foo", "bar", "baz"]
Copy link
Collaborator

@bsbodden bsbodden Feb 13, 2025

Choose a reason for hiding this comment

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

Here's where there is a conceptual misunderstanding... You have keys as keys = ["a", "b", "c"] but those are not the keys; they are the IDs! Where you construct the ids below, those are actually the Redis Keys.
What this PR should do is pass ids and internally grab the prefix from the index to construct the keys that will be retrieved from Redis. cc @tylerhutcherson

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