Introducing new capabilities for teams, third-party authentication and real-time database streaming!
Fauna logo
Log InSign Up
Fauna logo
Sign Up
© 2021 Fauna, Inc. All Rights Reserved.
<- Back
Hero built in collection indexes

Announcing Built-in Collection Indexes

Ewan Edwards|Feb 12th, 2020|



We’re pleased to announce a new FQL capability that empowers users to write more concise and powerful FQL statements: built-in collection indexes, along with the Documents function!

Built-in collection indexes (Documents function) Preview

With built-in collection indexes, you no longer need to create your own “collection index” just to track all of the documents that exist within a collection.

For example, if you have a collection of documents called “widgets”, you would normally have created a collection index:

  name: "all_widgets",
  Source: Collection("widgets")

So that you could then retrieve all of the “widgets” documents with:


Now, that “all_widgets” index is unnecessary. You can simply use this query:


The advantages are:

  • You no longer need to create one index per collection, just to track a collection’s documents.
  • You can remove any existing collection indexes (provided that you update queries that involve them) to save on storage.

Note: As a Preview function, Documents is currently only supported in the JavaScript, Java, and Scala drivers for Fauna. Support for Documents in the C#, Go, and Python drivers will be available in a future release.


With our latest release, users now have access to built-in collection indexes, the new Documents function, and some internal bug fixes and improvements that increase stability and performance.

As the Documents function is in Preview, please let us know what you think so that we can incorporate feedback into the formal release. Visit our documentation to learn more.

What other functions would you like to see implemented in Fauna? Please reach out to me on our Community Slack and describe any other features that would make Fauna an obvious choice for your next project.

If you enjoyed our blog, and want to work on systems and challenges related to globally distributed systems, serverless databases, GraphQL, and Jamstack, Fauna is hiring!

Share this post


Subscribe to Fauna blogs & newsletter

Get latest blog posts, development tips & tricks, and latest learning material delivered right to your inbox.

<- Back