AnyDescendant

Down: the steps after this one apply at this node and at every node below it.

Spelled .., and RFC 9535's descendant segment exactly — $..["@type"] is that field wherever it sits, the root's own member included. Zero levels counts, which is what makes $..a and $.a both match {"a":1}.

The step that is a pattern rather than a collapse, and the distinction is load-bearing. AnyElement exists because the data has positions this type will not distinguish: a document produces it. Nothing produces this one — a sketch walks documents and can only ever emit fields and elements, so SchemaInferenceTest asserts that no model over any corpus contains one. A path carrying it came from a caller who wrote .., which is why it may name an index and a predicate leaf and may never be a sketch key or a projection.

What it costs where it is used. The walks that build an index narrow their candidates on the way down and prune a subtree nothing can reach; a descendant candidate never narrows away, so a store defining such an index walks every document whole during flush and compaction. That is the price of the step and it is charged only to the stores that spell it.