0

am trying to access and read document from mongoDB,

query_dict = {

    "details.description": {"$exists": True}
}
field_names = ["details.description"]

reader = SimpleMongoReader(connection_string, 27017)
documents = reader.load_data(
        db_name, collection_name, field_names, query_dict)
index = GPTVectorStoreIndex.from_documents(documents)
index.storage_context.persist()

the library seems to only read first level keys, my target is details.description but when I run the code I get ValueError: details.description field not found in Mongo document., I've checked the implemented library and does seem to only expect first level and won't read nested, is there a solution for that other than changing the llama-index implementation ?

Exorcismus
  • 2,243
  • 1
  • 35
  • 68

0 Answers0