extract
Reports every (pathIndex, element) this document holds.
A path may be reported many times — $.items[*] over three items reports three elements — and the elements arrive in document order, which is what makes a per-element predicate's answer independent of how the walk is implemented.
A path landing on a scalar reports nothing, and neither does one landing on nothing at all. Same rule as Variant.select: "this document has nothing there" is an answer.
The element is a view over bytes valid only for the duration of the call; anything kept must be copied.
The same walk, reporting every path a budget stopped it short of.
TermExtractor.extract's three-argument form one level up, with the same contract and for the same caller: a composite index whose element walk saw a prefix of a container is an index that has fewer tuples than the document has elements, in a segment that would otherwise read as covered. IndexCatalog marks it not covered instead.
A truncated array reports the candidates the wildcard step kept; a truncated object reports every candidate still alive at it. Arrived paths — the containers this walk exists to find — are excluded, because a skipped child cannot carry a container a completed path already named.