run-llama / LlamaIndexTS

LlamaIndex in TypeScript

Home Page:https://ts.llamaindex.ai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SummaryIndex expects vector_store.json; causes continual recreation of this file

reidperyam opened this issue · comments

I noticed that when creating the default storage context from persistDir, it defaults to trying to load the vector_store.json file. However, the summary index does not create this file (or it does not persist it), so the "No valid data found at path: .../vector_store.json starting new store." pops up every time.

vectorStore =

Originally posted by @pelikhan in #649 (comment)

a workaround to avoid rebuilding the vector_index continually is to pass an empty VectorIndex in the constructor of the storageContext:

  const storageContext = await storageContextFromDefaults({
    persistDir,
    vectorStore: new SimpleVectorStore(),
  });

@reidperyam this is a good workaround. The SummaryIndex indeed doesn't need a vector store and the current design of the storage context must contain a vector store. I added a PR to ignore the warning: #861 @himself65 please have a look and merge