Not directly. Match returns a set reference, and as you noted, Map takes an array.
By design, Fauna does not permit you to perform queries that could exhaust server resources or interfere with other users querying their databases.
To retrieve items from a set, you need to use Paginate. If the number of entries is larger than 64 (Paginate's default page size), you can increase the page size up to 100,000. If the number of entries is larger than that, you have no choice but to issue multiple Paginate queries, passing the appropriate cursor each time, until all items have been retrieved. See the documentation for details: Paginate | Fauna Documentation
I was wondering if there is a solution without using Page for results less than 100,000.
Right now I am already using Page.
In fact, if the Map processed a maximum of 100,000 results when the Set was sent, there would be no need to use Page.
I’m guessing, a very large developer base is already using Page by giving a big number.
Except for all of the users who don’t want/need to grab 100000 records at once. The default is set to a lower number specifically so that you are required to change it when you need something different. FQL is super powerful, but does come at a cost of being lower-level and you being aware of how the queries are run.
Fascinating and confirmed. Does it fail if the Set contains more than 100000 documents? That I cannot confirm (don’t have the capacity to test).
Reducing a Set definitely opens possibilities for better readability, when Reduce already makes sense.
While returning a list of Refs, it doesn’t. @hasimyerlikaya example Maps the identity function, Lambda("x", Var("x")). At that point just Paginate, and don’t use Map.