Cloud Firestore Enterprise edition in Native mode is now available!
Learn more.
Offset
Stay organized with collections
Save and categorize content based on your preferences.
Preview: Firestore in Native mode (with Pipeline operations) for Enterprise
edition is subject to the "Pre-GA Offerings Terms" in the General
Service Terms section of the Service Specific
Terms . You can process personal
data for this feature as outlined in the Cloud Data Processing Addendum , subject
to the obligations and restrictions described in the agreement under which you
access Google Cloud. Pre-GA features are available "as is" and might have
limited support. For more information, see the launch stage
descriptions .
Description
Skips the first N input documents.
Syntax
Node.js
const results = await db . pipeline ()
. collection ( "/cities" )
. offset ( 10 )
. execute ();
Client examples
Node.js
const results = await db . pipeline ()
. collection ( "cities" )
. offset ( 10 )
. execute ();
Web
const results = await execute ( db . pipeline ()
. collection ( "cities" )
. offset ( 10 ));
Swift
let results = try await db . pipeline ()
. collection ( "cities" )
. offset ( 10 )
. execute ()
Kotlin
val results = db . pipeline ()
. collection ( "cities" )
. offset ( 10 )
. execute ()
Java
Task<Pipeline . Snapshot > results = db . pipeline ()
. collection ( "cities" )
. offset ( 10 )
. execute ();
Python
results = client . pipeline () . collection ( "cities" ) . offset ( 10 ) . execute ()
Java
Pipeline . Snapshot results =
firestore . pipeline (). collection ( "cities" ). offset ( 10 ). execute (). get ();
Behavior
The offset stage will skip the first N input documents. Unless a sort stage is used before the offset, the order in which documents are returned is unstable and repeated executions might produce different results.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-06 UTC.
[null,null,["Last updated 2026-02-06 UTC."],[],[]]