index auf doc_id feld sollte gehen
This commit is contained in:
Ali
2024-12-12 01:46:37 +01:00
parent 30856efe6e
commit a94be6ddb2
+4 -1
View File
@@ -82,7 +82,10 @@ def insert_data_mongo(id, filepath,pChunk):
'filepath': filepath, 'filepath': filepath,
'chunk_content': pChunk, 'chunk_content': pChunk,
} }
collection.insert_one(dokument) result = collection.insert_one(dokument)
if result.acknowledged:
collection.create_index("doc_id")
def reload_files(): def reload_files():
# path = input("Please provider path to folder: ") # path = input("Please provider path to folder: ")