public RepeatedField<Index.Types.IndexField> Fields { get; }
The fields supported by this index.
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.
Optional. Whether the index is multikey. By default, the index is not
multikey. For non-multikey indexes, none of the paths in the index
definition reach or traverse an array, except via an explicit array index.
For multikey indexes, at most one of the paths in the index definition
reach or traverse an array, except via an explicit array index. Violations
will result in errors.
Note this field only applies to index with MONGODB_COMPATIBLE_API ApiScope.
Output only. A server defined name for this index.
The form of this name for composite indexes will be:
projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}
For single field indexes, this field will be empty.
public Index.Types.QueryScope QueryScope { get; set; }
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 same collection ID.
Indexes with a collection group query scope specified allow queries against
all collections descended from a specific document, specified at query
time, and that have the same collection ID as this index.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis document provides reference documentation for the \u003ccode\u003eIndex\u003c/code\u003e class within the Google Cloud Firestore Admin v1 API, detailing its structure and functionality.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eIndex\u003c/code\u003e class is used to define and manage indexes that support various types of queries against documents in a Cloud Firestore database.\u003c/p\u003e\n"],["\u003cp\u003eMultiple versions of the \u003ccode\u003eGoogle.Cloud.Firestore.Admin.V1\u003c/code\u003e package are available, ranging from version 2.2.0 to the latest version 3.12.0, with links to their respective documentation.\u003c/p\u003e\n"],["\u003cp\u003eKey properties of the \u003ccode\u003eIndex\u003c/code\u003e class include \u003ccode\u003eApiScope\u003c/code\u003e, \u003ccode\u003eFields\u003c/code\u003e, \u003ccode\u003eIndexName\u003c/code\u003e, \u003ccode\u003eName\u003c/code\u003e, \u003ccode\u003eQueryScope\u003c/code\u003e, and \u003ccode\u003eState\u003c/code\u003e, which collectively define the index's behavior and status.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eIndex\u003c/code\u003e class implements multiple interfaces such as \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, and inherits members from the \u003ccode\u003eobject\u003c/code\u003e class, indicating its capabilities and integration within the .NET framework.\u003c/p\u003e\n"]]],[],null,["# Firestore Admin v1 API - Class Index (3.15.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.15.0 (latest)](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/latest/Google.Cloud.Firestore.Admin.V1.Index)\n- [3.14.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/3.14.0/Google.Cloud.Firestore.Admin.V1.Index)\n- [3.13.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/3.13.0/Google.Cloud.Firestore.Admin.V1.Index)\n- [3.12.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/3.12.0/Google.Cloud.Firestore.Admin.V1.Index)\n- [3.11.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/3.11.0/Google.Cloud.Firestore.Admin.V1.Index)\n- [3.10.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/3.10.0/Google.Cloud.Firestore.Admin.V1.Index)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/3.9.0/Google.Cloud.Firestore.Admin.V1.Index)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/3.8.0/Google.Cloud.Firestore.Admin.V1.Index)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/3.7.0/Google.Cloud.Firestore.Admin.V1.Index)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/3.6.0/Google.Cloud.Firestore.Admin.V1.Index)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/3.5.0/Google.Cloud.Firestore.Admin.V1.Index)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/3.4.0/Google.Cloud.Firestore.Admin.V1.Index)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/3.3.0/Google.Cloud.Firestore.Admin.V1.Index)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/3.2.0/Google.Cloud.Firestore.Admin.V1.Index)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/3.1.0/Google.Cloud.Firestore.Admin.V1.Index)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/3.0.0/Google.Cloud.Firestore.Admin.V1.Index)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/2.4.0/Google.Cloud.Firestore.Admin.V1.Index)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/2.3.0/Google.Cloud.Firestore.Admin.V1.Index)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/2.2.0/Google.Cloud.Firestore.Admin.V1.Index) \n\n public sealed class Index : IMessage\u003cIndex\u003e, IEquatable\u003cIndex\u003e, IDeepCloneable\u003cIndex\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Firestore Admin v1 API class Index.\n\nCloud Firestore indexes enable simple and complex queries against\ndocuments in a database. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Index \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Index](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/latest/Google.Cloud.Firestore.Admin.V1.Index), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Index](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/latest/Google.Cloud.Firestore.Admin.V1.Index), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Index](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/latest/Google.Cloud.Firestore.Admin.V1.Index), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Firestore.Admin.V1](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/latest/Google.Cloud.Firestore.Admin.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Firestore.Admin.V1.dll\n\nConstructors\n------------\n\n### Index()\n\n public Index()\n\n### Index(Index)\n\n public Index(Index other)\n\nProperties\n----------\n\n### ApiScope\n\n public Index.Types.ApiScope ApiScope { get; set; }\n\nThe API scope supported by this index.\n\n### Density\n\n public Index.Types.Density Density { get; set; }\n\nImmutable. The density configuration of the index.\n\n### Fields\n\n public RepeatedField\u003cIndex.Types.IndexField\u003e Fields { get; }\n\nThe fields supported by this index.\n\nFor composite indexes, this requires a minimum of 2 and a maximum of 100\nfields. The last field entry is always for the field path `__name__`. If,\non creation, `__name__` was not specified as the last field, it will be\nadded automatically with the same direction as that of the last field\ndefined. If the final field in a composite index is not directional, the\n`__name__` will be ordered ASCENDING (unless explicitly specified).\n\nFor single field indexes, this will always be exactly one entry with a\nfield path equal to the field path of the associated field.\n\n### IndexName\n\n public IndexName IndexName { get; set; }\n\n[IndexName](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/latest/Google.Cloud.Firestore.Admin.V1.IndexName)-typed view over the [Name](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/latest/Google.Cloud.Firestore.Admin.V1.Index#Google_Cloud_Firestore_Admin_V1_Index_Name) resource name property.\n\n### Multikey\n\n public bool Multikey { get; set; }\n\nOptional. Whether the index is multikey. By default, the index is not\nmultikey. For non-multikey indexes, none of the paths in the index\ndefinition reach or traverse an array, except via an explicit array index.\nFor multikey indexes, at most one of the paths in the index definition\nreach or traverse an array, except via an explicit array index. Violations\nwill result in errors.\n\nNote this field only applies to index with MONGODB_COMPATIBLE_API ApiScope.\n\n### Name\n\n public string Name { get; set; }\n\nOutput only. A server defined name for this index.\nThe form of this name for composite indexes will be:\n`projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}`\nFor single field indexes, this field will be empty.\n\n### QueryScope\n\n public Index.Types.QueryScope QueryScope { get; set; }\n\nIndexes with a collection query scope specified allow queries\nagainst a collection that is the child of a specific document, specified at\nquery time, and that has the same collection ID.\n\nIndexes with a collection group query scope specified allow queries against\nall collections descended from a specific document, specified at query\ntime, and that have the same collection ID as this index.\n\n### ShardCount\n\n public int ShardCount { get; set; }\n\nOptional. The number of shards for the index.\n\n### State\n\n public Index.Types.State State { get; set; }\n\nOutput only. The serving state of the index."]]