Replies: 1 comment
-
Hey @onazaruk, nice to see you diving into the intricacies of LlamaIndex again! How’s everything going on your end? Based on the current implementation of the However, you can manipulate the underlying
node_with_embedding = node.copy()
node_with_embedding.embedding = [1.0 for i in range(EMBEDDING_DIM)]
new_nodes = [node_with_embedding for i in range(NUMBER_OF_DATA)]
vector_store.add(new_nodes)
ref_doc_id = str(node.ref_doc_id)
vector_store.delete(ref_doc_id) By using these methods, you can effectively refresh the data in your You can find more details about these methods in the Please note that this approach requires you to manage the Sources
|
Beta Was this translation helpful? Give feedback.
-
Hi,
According to the current documentation
refresh()/refresh_ref_doc()
should work on theVectorStoreIndex
with storage context set toElasticsearchStore
. But the code of therefresh
method is using data (e.g. hash of the existing docs) fromdocstore
, and in this case thedocstore
is empty, hence any document during refresh is considered to be new, sorefresh/update
methods basically work asinsert
.Is there any way to refresh index without drop/recreate the whole thing in Elastic Search?
BR,
Oleksii
Beta Was this translation helpful? Give feedback.
All reactions