Find answers from the community

Updated 8 months ago

Hey, I have a question concerning chroma

Hey, I have a question concerning chroma db,

Plain Text
python 
# load from disk
db2 = chromadb.PersistentClient(path="./chroma_db")
chroma_collection = db2.get_or_create_collection("quickstart")
vector_store = ChromaVectorStore(chroma_collection=chroma_collection)
index = VectorStoreIndex.from_vector_store(
    vector_store,
    embed_model=embed_model,
)

when using this code, does it mean that queryengine i make based on this index will only use the documents in the collection called quickstart and will not use any document in another collection ?

the way I created my vector database was that I create a collection for each "Category of files" (financial files, general, ...etc) (I chose this structure because I wanted to have a global database that contains all of the files from different categories, and have seperate databases for each category, but I want the index of the global database to use them all, hence my question.
W
g
8 comments
Yes it will only use the collection quickstart for querying
is there a way to make it use all of the collections ?
or to custumize which collections to use ?
because for the moment i have a db with multiple collections as i explained before (each for a category of documents), and now I want to query over them all
No I dont think so without you creating index with collection
I'm already using the chat engine since it's a chatbot, i'm thinking maybe i can update one of the collections to add the Parsed documents of the other categories as well, is there a way to update a collection with multiple documents ?
You can try index.insert() method and add it to the existing index
Add a reply
Sign up and join the conversation on Discord