Forum

Author Topic: Get the document a chunk belongs to  (Read 4529 times)

sergio

  • Newbie
  • *
  • Posts: 17
    • View Profile
Get the document a chunk belongs to
« on: August 24, 2023, 12:47:27 PM »

I know this will sound a bit silly, but I'd like to know the document a certain chunk belongs to. I know that to get a chunk I must have got it but in my code, the document is actually not exposed in my scope.
I'm doing something like:

Code: [Select]

chunk = get_chunk_from_file(filename, chunk_type)

...
do some other stuff
...

It turns out that now I actually need a reference fo the Docuoment.

Any clues on this?