Reference documentation and code samples for the Cloud Firestore Admin V1 API module Google::Cloud::Firestore::Admin::V1::Index::QueryScope.
Query Scope defines the scope at which a query is run. This is specified on
a StructuredQuery's from field.
Constants
QUERY_SCOPE_UNSPECIFIED
value: 0 The query scope is unspecified. Not a valid option.
COLLECTION
value: 1 Indexes with a collection query scope specified allow queries
against a collection that is the child of a specific document, specified
at query time, and that has the collection ID specified by the index.
COLLECTION_GROUP
value: 2 Indexes with a collection group query scope specified allow queries
against all collections that has the collection ID specified by the
index.
COLLECTION_RECURSIVE
value: 3 Include all the collections's ancestor in the index. Only available for
Datastore Mode databases.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Cloud Firestore Admin V1 API - Module Google::Cloud::Firestore::Admin::V1::Index::QueryScope (v1.7.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.7.0 (latest)](/ruby/docs/reference/google-cloud-firestore-admin-v1/latest/Google-Cloud-Firestore-Admin-V1-Index-QueryScope)\n- [1.6.0](/ruby/docs/reference/google-cloud-firestore-admin-v1/1.6.0/Google-Cloud-Firestore-Admin-V1-Index-QueryScope)\n- [1.5.0](/ruby/docs/reference/google-cloud-firestore-admin-v1/1.5.0/Google-Cloud-Firestore-Admin-V1-Index-QueryScope)\n- [1.4.1](/ruby/docs/reference/google-cloud-firestore-admin-v1/1.4.1/Google-Cloud-Firestore-Admin-V1-Index-QueryScope)\n- [1.3.0](/ruby/docs/reference/google-cloud-firestore-admin-v1/1.3.0/Google-Cloud-Firestore-Admin-V1-Index-QueryScope)\n- [1.2.0](/ruby/docs/reference/google-cloud-firestore-admin-v1/1.2.0/Google-Cloud-Firestore-Admin-V1-Index-QueryScope)\n- [1.1.0](/ruby/docs/reference/google-cloud-firestore-admin-v1/1.1.0/Google-Cloud-Firestore-Admin-V1-Index-QueryScope)\n- [1.0.1](/ruby/docs/reference/google-cloud-firestore-admin-v1/1.0.1/Google-Cloud-Firestore-Admin-V1-Index-QueryScope)\n- [0.18.0](/ruby/docs/reference/google-cloud-firestore-admin-v1/0.18.0/Google-Cloud-Firestore-Admin-V1-Index-QueryScope)\n- [0.17.1](/ruby/docs/reference/google-cloud-firestore-admin-v1/0.17.1/Google-Cloud-Firestore-Admin-V1-Index-QueryScope)\n- [0.16.0](/ruby/docs/reference/google-cloud-firestore-admin-v1/0.16.0/Google-Cloud-Firestore-Admin-V1-Index-QueryScope)\n- [0.15.0](/ruby/docs/reference/google-cloud-firestore-admin-v1/0.15.0/Google-Cloud-Firestore-Admin-V1-Index-QueryScope)\n- [0.14.3](/ruby/docs/reference/google-cloud-firestore-admin-v1/0.14.3/Google-Cloud-Firestore-Admin-V1-Index-QueryScope)\n- [0.13.0](/ruby/docs/reference/google-cloud-firestore-admin-v1/0.13.0/Google-Cloud-Firestore-Admin-V1-Index-QueryScope)\n- [0.12.0](/ruby/docs/reference/google-cloud-firestore-admin-v1/0.12.0/Google-Cloud-Firestore-Admin-V1-Index-QueryScope)\n- [0.11.0](/ruby/docs/reference/google-cloud-firestore-admin-v1/0.11.0/Google-Cloud-Firestore-Admin-V1-Index-QueryScope)\n- [0.10.0](/ruby/docs/reference/google-cloud-firestore-admin-v1/0.10.0/Google-Cloud-Firestore-Admin-V1-Index-QueryScope)\n- [0.9.0](/ruby/docs/reference/google-cloud-firestore-admin-v1/0.9.0/Google-Cloud-Firestore-Admin-V1-Index-QueryScope)\n- [0.8.0](/ruby/docs/reference/google-cloud-firestore-admin-v1/0.8.0/Google-Cloud-Firestore-Admin-V1-Index-QueryScope)\n- [0.7.1](/ruby/docs/reference/google-cloud-firestore-admin-v1/0.7.1/Google-Cloud-Firestore-Admin-V1-Index-QueryScope)\n- [0.6.0](/ruby/docs/reference/google-cloud-firestore-admin-v1/0.6.0/Google-Cloud-Firestore-Admin-V1-Index-QueryScope)\n- [0.5.0](/ruby/docs/reference/google-cloud-firestore-admin-v1/0.5.0/Google-Cloud-Firestore-Admin-V1-Index-QueryScope)\n- [0.4.0](/ruby/docs/reference/google-cloud-firestore-admin-v1/0.4.0/Google-Cloud-Firestore-Admin-V1-Index-QueryScope)\n- [0.3.5](/ruby/docs/reference/google-cloud-firestore-admin-v1/0.3.5/Google-Cloud-Firestore-Admin-V1-Index-QueryScope) \nReference documentation and code samples for the Cloud Firestore Admin V1 API module Google::Cloud::Firestore::Admin::V1::Index::QueryScope.\n\nQuery Scope defines the scope at which a query is run. This is specified on\na StructuredQuery's `from` field.\n\nConstants\n---------\n\n### QUERY_SCOPE_UNSPECIFIED\n\n**value:** 0 \nThe query scope is unspecified. Not a valid option.\n\n### COLLECTION\n\n**value:** 1 \nIndexes with a collection query scope specified allow queries\nagainst a collection that is the child of a specific document, specified\nat query time, and that has the collection ID specified by the index.\n\n### COLLECTION_GROUP\n\n**value:** 2 \nIndexes with a collection group query scope specified allow queries\nagainst all collections that has the collection ID specified by the\nindex.\n\n### COLLECTION_RECURSIVE\n\n**value:** 3 \nInclude all the collections's ancestor in the index. Only available for\nDatastore Mode databases."]]