diff --git a/google/firestore/admin/v1/index.proto b/google/firestore/admin/v1/index.proto index 54b5e7e8776e0..2567da6509c44 100644 --- a/google/firestore/admin/v1/index.proto +++ b/google/firestore/admin/v1/index.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -50,6 +50,21 @@ message Index { // against all collections that has the collection id specified by the // index. COLLECTION_GROUP = 2; + + // Include all the collections's ancestor in the index. Only available for + // Datastore Mode databases. + COLLECTION_RECURSIVE = 3; + } + + // API Scope defines the APIs (Firestore Native, or Firestore in + // Datastore Mode) that are supported for queries. + enum ApiScope { + // The index can only be used by the Firestore Native query API. + // This is the default. + ANY_API = 0; + + // The index can only be used by the Firestore in Datastore Mode query API. + DATASTORE_MODE_API = 1; } // A field in an index. @@ -138,14 +153,17 @@ message Index { // time, and that have the same collection id as this index. QueryScope query_scope = 2; + // The API scope supported by this index. + ApiScope api_scope = 5; + // The fields supported by this index. // - // For composite indexes, this is always 2 or more fields. - // The last field entry is always for the field path `__name__`. If, on - // creation, `__name__` was not specified as the last field, it will be added - // automatically with the same direction as that of the last field defined. If - // the final field in a composite index is not directional, the `__name__` - // will be ordered ASCENDING (unless explicitly specified). + // For composite indexes, this requires a minimum of 2 and a maximum of 100 + // fields. The last field entry is always for the field path `__name__`. If, + // on creation, `__name__` was not specified as the last field, it will be + // added automatically with the same direction as that of the last field + // defined. If the final field in a composite index is not directional, the + // `__name__` will be ordered ASCENDING (unless explicitly specified). // // For single field indexes, this will always be exactly one entry with a // field path equal to the field path of the associated field.