Just a quick blag for my future self:
Didn't give me what I wanted. While slapping
FOR row IN coll FOR entry in doc.array FILTER entry.field_name != @field_name LIMIT @limit RETURN DISTINCT doc
RETURNfixed the problem of "I'm getting the same document over and over again" it now doesn't return
@limitmany documents but seemingly a random — but lower — number. What's actually happening here is, that the indentation is deceiving: the last two lines should be indented one more.
Is what I _actually_ wanted. Edit (2023-04-18): And _now_ I learned that you should actually do this:
FOR row IN coll FILTER POSITION(doc.array[*].field_name , @field_name) == false LIMIT @limit RETURN doc
FOR row IN coll FILTER @field_name NOT IN doc.array[*].field_name LIMIT @limit RETURN doc