Intersection
Intersection( group, ... )
Intersection( group, ... )
Intersection( group, ... )
Intersection( group, ... )
intersection( group, ... )
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.
ObjectV(data: Arr(RefV(id = "181388642071085568", collection = RefV(id = "spells", collection = RefV(id = "collections")))))
map[data:[{181388642071085568 0xc0001421e0 0xc0001421e0 <nil>}]]
{data: [ref(id = "181388642071085568", collection = ref(id = "spells", collection = ref(id = "collections")))]}
{ data: [ Ref(Collection("spells"), "181388642071085568") ] }
{'data': [Ref(id=181388642071085568, collection=Ref(id=spells, collection=Ref(id=collections)))]}
{ data: [ Ref(Collection("spells"), "181388642071085568") ] }
The following query demonstrates how various arrays are evaluated:
Arr(Arr(), Arr(StringV(B)), Arr(StringV(B), StringV(C)), Arr(StringV(B)))
[[] [B] [B C] [B]]
[[], ["B"], ["B", "C"], ["B"]]
[ [], [ 'B' ], [ 'B', 'C' ], [ 'B' ] ]
[[], ['B'], ['B', 'C'], ['B']]
[ [], [ '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!