Stay organized with collections
Save and categorize content based on your preferences.
Query Scope defines the scope at which a query is run. This is specified on a StructuredQuery's from field.
Enums
QUERY_SCOPE_UNSPECIFIED
The query scope is unspecified. Not a valid option.
COLLECTION
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
Indexes with a collection group query scope specified allow queries against all collections that has the collection ID specified by the index.
COLLECTION_RECURSIVE
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-05-19 UTC."],[[["\u003cp\u003eQuery Scope is determined by the \u003ccode\u003efrom\u003c/code\u003e field within a StructuredQuery.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCOLLECTION\u003c/code\u003e scope enables queries against a specific document's child collection, defined by the collection ID.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCOLLECTION_GROUP\u003c/code\u003e scope allows queries across all collections matching the index's specified collection ID.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCOLLECTION_RECURSIVE\u003c/code\u003e scope is exclusive to Datastore Mode databases and includes all the collection's ancestor in the index.\u003c/p\u003e\n"]]],[],null,["# QueryScope\n\nQuery Scope defines the scope at which a query is run. This is specified on a StructuredQuery's `from` field."]]