Find answers from the community

Updated last year

Mongo

Plain Text
from llama_index import load_index_from_storage
storage_context = StorageContext.from_defaults(
    docstore=MongoDocumentStore.from_uri(uri=mongo_url, db_name=db_name),
    index_store=MongoIndexStore.from_uri(uri=mongo_url, db_name=db_name),
)

index_test = load_index_from_storage(storage_context)


I try to load an index from my mongodb using this code. It's load someting but when trying to use it as query, it's return always 0 results.

Can you help me please?
L
i
6 comments
What kind of index is it?
GPTVectorstoreIndex
The vector index also saves a vector_store.json file

Tbh if you want remote storage with a vector store, use an integration like qdrant, weaviate, pinecone, chroma, etc.
So using mongodb is not possible for this use case?
Not for this use case

There is a mongo vector index -- but I really would not recommend it, the setup is not easy or user friendly
Thanks. I will try others ? Last question. It can be usefull to store other meta data on mongo and only index on pinecone for example?
Add a reply
Sign up and join the conversation on Discord