Find answers from the community

Updated last year

Docstore

At a glance
there is data in chroma db itself but docstore.docs prints nothing, I tried VectorStoreIndex.from_documents too, same result. Im using chroma PersistentClient btw, very weird πŸ€”
L
T
7 comments
The docstore is not used by default when using a vector db integration, all the nodes are serialized into chroma here

You can construct the index with an override to use the docstore if you want to

from_documents(..., store_nodes_override=True)
Chroma won't work with BM25 unless you have that override set, but then you also need to store/persist the docstore
Or you can just instantiate a docstore directly
If I created the index with from_documents(..., store_nodes_override=True) will I be able to use BM25 later by creating the index with from_vector_store(vector_store=vector_store) without having to create a separate docstore? Since Im pretty sure chroma stores the text documents too
chroma stores the documents/nodes, but they currently arent directly accessible (maybe this needs a PR). You need the docstore (which also involves storing/loading the docstore)

So, your code above would not work
Here's a link showing how to override and save/load with a vectodb integration (admittdly not very user friendly at the moment)

https://discord.com/channels/1059199217496772688/1163880111074971790/1163900056718553169
I agree, we should have chroma docs accessible in the future, thanks regardless!
Add a reply
Sign up and join the conversation on Discord