Get list of documents from a specific segment

Is there a way to inspect which documents are stored in a specific segment? I can get the segments from the cat segments api, but it only tells me the total # of docs.

I want to perform two functions:

  1. Given a segment id, return the list of documents in that segment
  2. Given a document id, return the segment id of the segment it is in (if it is in multiple segments due to deletions, return all segments)

Does such functionality exist?

Thank you!
Chris

As far as i know it does not exist. Why would you need this?

For inspection and understanding; not a production use case

As Christian mentioned, you cannot do this.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.