Intersection
Intersection( group, ... )
Description
The Intersection
function compares all of the items in each group
,
which can be an Array or Set Reference, and returns the
elements that appear in every provided group
.
The run time of For query timeout errors, you may specify a larger query timeout via the driver that you are using. |
Examples
The following query intersects the Set Reference
returned by locating the search term "fire" in the index named
"spells_by_element" with the Set Reference returned by locating
the search term "water" in the Index named "spells_by_element". The
Paginate
function executes the Set Reference and returns
the results of the Intersect
operation in a Page.
{ data: [ Ref(Collection("spells"), "181388642071085568") ] }
The following query demonstrates how various arrays are evaluated:
[ [], [ 'B' ], [ 'B', 'C' ], [ 'B' ] ]
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!