-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add support for OpenSearch as a database #300
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good. As discussed before, I would try to get some basic integretion tests working for OpenSearch - see tests/integration/test_pgvector.py
. If we can get a local Docker image working then it should be possible to ru the tests against that.
To your quesiton on metadata filtering, YFCC makes uses of metadata.
# None specified, default to "vsb-<workload>" | ||
self.index_name = f"vsb-{name}" | ||
|
||
self.create_index() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You shouldn't need to call create_index() here, it should be sufficient to just do it in initialise_population
.
actions.append(action) | ||
actions.append(vector_document) | ||
# Bulk ingest documents | ||
return self.client.bulk(body=actions,request_timeout=600) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: You don't need to retry the creation of the actions list - just move that into the head of insert_batch
, and then have your do_insert_with_retry
method just call self.client.bulk
.
Problem
Describe the purpose of this change. What problem is being solved and why?
Solution
Describe the approach you took. Link to any relevant bugs, issues, docs, or other resources.
Type of Change
Test Plan
Describe specific steps for validating this change.