Skip to content

Commit ebd2b3b

Browse files
comments
1 parent 75ac20d commit ebd2b3b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

segment.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,17 @@ type Synonym interface {
244244
Size() int
245245
}
246246

247+
// NestedSegment is an optional interface that a Segment may implement
248+
// to provide access to nested document relationships within that segment.
247249
type NestedSegment interface {
248250
Segment
249-
251+
// Ancestors returns a slice of ancestor document IDs for the given document ID.
252+
// If the document has no ancestors or if the segment does not support nested documents,
253+
// an empty slice is returned.
250254
Ancestors(docID uint64) []uint64
255+
256+
// Descendants returns a slice of descendant document IDs for the given document ID.
257+
// If the document has no descendants or if the segment does not support nested documents,
258+
// an empty slice is returned.
259+
Descendants(docID uint64) []uint64
251260
}

0 commit comments

Comments
 (0)