Find answers from the community

Updated 11 months ago

Hi guys, I am trying to dump vector

Hi guys, I am trying to dump vector embedding files that I have in my local
{default_vector.json, image_vector.json, index_store.json} into Opensearch database. Can you help me with the solution.
L
1 comment
You can get the nodes+ embeddings and throw them into opensearch

Plain Text
node_id_to_embedding = index.vector_store._data.embedding_dict
node_id_to_node = index.docstore.docs
final_nodes = []
for node_id, node in node_id_to_node.items():
  node.embedding = node_id_to_embedding[node_id]
  final_nodes.append(node)

index = VectorStoreIndex(nodes=final_nodes, storage_context=opensearch_storage_context)
Add a reply
Sign up and join the conversation on Discord