[Question]: #8413
Replies: 1 comment
-
🤖 Hello, Based on the context provided, it seems like you're trying to load new documents or nodes into an existing FAISS vector store that is persisting in You can use the from llama_index.vector_stores.faiss import FaissVectorStore
from llama_index.schema import TextNode
from llama_index.storage.index_store.simple_index_store import SimpleIndexStore
# Create a new node
node = TextNode(text="new node", id_="d4", metadata={"node": "info"})
# Load the existing vector store from the persisted file
vector_store = FaissVectorStore.from_persist_path('./storage/index_store.json')
# Add the new node to the vector store
vector_store.add([node])
# Load the existing index store
index_store = SimpleIndexStore.from_persist_path('./storage/index_store.json')
# Persist the updated index store
index_store.persist('./storage/index_store.json') This will update the As for the The I hope this helps! If you have any other questions, feel free to ask. Best, Sources
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Beta Was this translation helpful? Give feedback.
-
Question Validation
Question
Using SimpleDirectoryReader for my new document or nodes, how can I load them into an existing FAISS vector store that I have persisting in ./storage? The index.insert and index.insert_nodes methods are not working.
The docstore.json and index_store.json are not being updated in the ./storage directory. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions