distinct()
Get unique elements.
Description
The distinct()
method returns the unique elements of an ordered set.
The distinct()
method can be used on the results returned by an index
provided the result set isn’t reordered and map()
or
flatMap()
have not been called on the set. It can also
be used to sort array fields in a document. Because field arrays are limited
to the maximum document size of 8 MB, they need not be presorted
before calling distinct()
.
There is no limit on the size of the set that the distinct()
method can
be run on.
The source set isn’t changed.
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!