Reference documentation and code samples for the Cloud Firestore V1 Client class QueryScope.
Query Scope defines the scope at which a query is run. This is specified on
a StructuredQuery's from field.
Protobuf type google.firestore.admin.v1.Index.QueryScope
Namespace
Google \ Cloud \ Firestore \ Admin \ V1 \ Index
Methods
static::name
Parameter
Name
Description
value
mixed
static::value
Parameter
Name
Description
name
mixed
Constants
QUERY_SCOPE_UNSPECIFIED
Value: 0
The query scope is unspecified. Not a valid option.
Generated from protobuf enum QUERY_SCOPE_UNSPECIFIED = 0;
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.
Generated from protobuf enum COLLECTION = 1;
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.
Generated from protobuf enum COLLECTION_GROUP = 2;
COLLECTION_RECURSIVE
Value: 3
Include all the collections's ancestor in the index. Only available for
Datastore Mode databases.
Generated from protobuf enum COLLECTION_RECURSIVE = 3;
[[["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 V1 Client - Class QueryScope (1.53.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.53.0 (latest)](/php/docs/reference/cloud-firestore/latest/Admin.V1.Index.QueryScope)\n- [1.52.0](/php/docs/reference/cloud-firestore/1.52.0/Admin.V1.Index.QueryScope)\n- [1.51.0](/php/docs/reference/cloud-firestore/1.51.0/Admin.V1.Index.QueryScope)\n- [1.50.0](/php/docs/reference/cloud-firestore/1.50.0/Admin.V1.Index.QueryScope)\n- [1.48.1](/php/docs/reference/cloud-firestore/1.48.1/Admin.V1.Index.QueryScope)\n- [1.47.3](/php/docs/reference/cloud-firestore/1.47.3/Admin.V1.Index.QueryScope)\n- [1.46.0](/php/docs/reference/cloud-firestore/1.46.0/Admin.V1.Index.QueryScope)\n- [1.45.2](/php/docs/reference/cloud-firestore/1.45.2/Admin.V1.Index.QueryScope)\n- [1.44.1](/php/docs/reference/cloud-firestore/1.44.1/Admin.V1.Index.QueryScope)\n- [1.43.3](/php/docs/reference/cloud-firestore/1.43.3/Admin.V1.Index.QueryScope)\n- [1.40.0](/php/docs/reference/cloud-firestore/1.40.0/Admin.V1.Index.QueryScope)\n- [1.39.0](/php/docs/reference/cloud-firestore/1.39.0/Admin.V1.Index.QueryScope)\n- [1.38.0](/php/docs/reference/cloud-firestore/1.38.0/Admin.V1.Index.QueryScope)\n- [1.37.7](/php/docs/reference/cloud-firestore/1.37.7/Admin.V1.Index.QueryScope)\n- [1.36.1](/php/docs/reference/cloud-firestore/1.36.1/Admin.V1.Index.QueryScope)\n- [1.35.0](/php/docs/reference/cloud-firestore/1.35.0/Admin.V1.Index.QueryScope)\n- [1.34.0](/php/docs/reference/cloud-firestore/1.34.0/Admin.V1.Index.QueryScope)\n- [1.33.0](/php/docs/reference/cloud-firestore/1.33.0/Admin.V1.Index.QueryScope)\n- [1.32.0](/php/docs/reference/cloud-firestore/1.32.0/Admin.V1.Index.QueryScope)\n- [1.31.0](/php/docs/reference/cloud-firestore/1.31.0/Admin.V1.Index.QueryScope)\n- [1.30.0](/php/docs/reference/cloud-firestore/1.30.0/Admin.V1.Index.QueryScope)\n- [1.28.0](/php/docs/reference/cloud-firestore/1.28.0/Admin.V1.Index.QueryScope)\n- [1.27.3](/php/docs/reference/cloud-firestore/1.27.3/Admin.V1.Index.QueryScope) \nReference documentation and code samples for the Cloud Firestore V1 Client class QueryScope.\n\nQuery Scope defines the scope at which a query is run. This is specified on\na StructuredQuery's `from` field.\n\nProtobuf type `google.firestore.admin.v1.Index.QueryScope`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Firestore \\\\ Admin \\\\ V1 \\\\ Index\n\nMethods\n-------\n\n### static::name\n\n### static::value\n\nConstants\n---------\n\n### QUERY_SCOPE_UNSPECIFIED\n\n Value: 0\n\nThe query scope is unspecified. Not a valid option.\n\nGenerated from protobuf enum `QUERY_SCOPE_UNSPECIFIED = 0;`\n\n### COLLECTION\n\n Value: 1\n\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\nGenerated from protobuf enum `COLLECTION = 1;`\n\n### COLLECTION_GROUP\n\n Value: 2\n\nIndexes with a collection group query scope specified allow queries\nagainst all collections that has the collection ID specified by the\nindex.\n\nGenerated from protobuf enum `COLLECTION_GROUP = 2;`\n\n### COLLECTION_RECURSIVE\n\n Value: 3\n\nInclude all the collections's ancestor in the index. Only available for\nDatastore Mode databases.\n\nGenerated from protobuf enum `COLLECTION_RECURSIVE = 3;`"]]