Find answers from the community

Updated 2 years ago

doc names

Are the original document names saved in the index?
m
M
z
6 comments
My understanding is that when you add documents to the index, you could include a doc_id with each
Document(‘content’, ‘doc name’)
Hmm when I read with SimpleDirectoryReader each document has an empty doc_id, when I make an index there is a doc_id that is not related to the filename
When creating a document, you can set the file name in the extra_info parameter.
yes it will provide a randomly generated UUID if you don't provide your own doc_id per document
Okay, I was able to do this with the SimpleDirectoryReader by adding a file_metadata function.
Add a reply
Sign up and join the conversation on Discord