Document
to Node
can result in an 1:n relationship due to text chunking. In my situation the problem is that llama_index.node_parser.node_utils.get_nodes_from_document
will not use Document.doc_id
but auto-generate Node.doc_id
. Right now I resolved the problem by overwriting this function and defining a custom Node-parser enforcing to set Node.doc_id
equal to Document.doc_id
. This works because my Document
is already split and I keep a 1:1 relationship between Document
and Node
.