Three Results Went In. Seven Rows Came Out: What Unwind Actually Does to a Result Set
One search for a nylon hiking backpack returns three documents. Two carry no edges and are dropped entirely by the unwind stage; the third carries seven edges and becomes seven rows. input_count 3, output_count 7, and the two dropped documents never appear as empty rows because preserve_null_and_empty defaults to false.

unwind decomposes an array field into one document per member. Most people meet it as a 1-to-N expansion, which it is. The half that surprises people is that it also removes documents: if the array is empty, the document does not survive the stage.
This diagram is drawn from one search for "nylon hiking backpack" against a 118-image product catalog, final_top_k 3. Three documents came back. Ripstop Hiking Backpack and Canvas Hiking Backpack each carried zero edges. Nylon Hiking Backpack carried seven, all typed same_material, each pointing at a tent SKU that shares its material. Running unwind on the edges field, stage_statistics reported input_count 3, output_count 7. Every edge on this document is same_material because that is the only edge type this corpus produces; a richer graph would be invented rather than shown.
The part worth knowing before shipping it: preserve_null_and_empty defaults to false. The two backpacks with no edges are not passed through as empty rows, they are gone. Three in, seven out, and the arithmetic hides the fact that two of the three inputs contributed nothing and vanished.
That matters most for paging. After an unwind, page size counts array members, not the documents a caller thinks they are paging through. A page of 25 might be four products or it might be one product with 25 edges, and the response does not distinguish them. Set preserve_null_and_empty to true when the absence is itself the answer, for example when auditing which products have no relationships at all. The default is right for the common case and wrong for that one.
Of the 118 documents in this catalog, 28 carry edges and every one of them carries exactly seven, all same_material. Counts, edge payloads and SKUs above are from one execution with skip_cache true, not reconstructed from a schema.
Where this diagram appears
Run this on your own data
Mixpeek turns video, images, audio, and documents in your object storage into searchable, timestamped results through one API.
Search your own data

