Resource: Index
Datastore composite index definition.
JSON representation |
---|
{ "projectId": string, "indexId": string, "kind": string, "ancestor": enum ( |
Fields | |
---|---|
projectId |
Output only. Project ID. |
indexId |
Output only. The resource ID of the index. |
kind |
Required. The entity kind to which this index applies. |
ancestor |
Required. The index's ancestor mode. Must not be ANCESTOR_MODE_UNSPECIFIED. |
properties[] |
Required. An ordered sequence of property names and their index attributes. Requires:
|
state |
Output only. The state of the index. |
AncestorMode
For an ordered index, specifies whether each of the entity's ancestors will be included.
Enums | |
---|---|
ANCESTOR_MODE_UNSPECIFIED |
The ancestor mode is unspecified. |
NONE |
Do not include the entity's ancestors in the index. |
ALL_ANCESTORS |
Include all the entity's ancestors in the index. |
IndexedProperty
A property of an index.
JSON representation |
---|
{
"name": string,
"direction": enum ( |
Fields | |
---|---|
name |
Required. The property name to index. |
direction |
Required. The indexed property's direction. Must not be DIRECTION_UNSPECIFIED. |
Direction
The direction determines how a property is indexed.
Enums | |
---|---|
DIRECTION_UNSPECIFIED |
The direction is unspecified. |
ASCENDING |
The property's values are indexed so as to support sequencing in ascending order and also query by <, >, <=, >=, and =. |
DESCENDING |
The property's values are indexed so as to support sequencing in descending order and also query by <, >, <=, >=, and =. |
State
The possible set of states of an index.
Enums | |
---|---|
STATE_UNSPECIFIED |
The state is unspecified. |
CREATING |
The index is being created, and cannot be used by queries. There is an active long-running operation for the index. The index is updated when writing an entity. Some index data may exist. |
READY |
The index is ready to be used. The index is updated when writing an entity. The index is fully populated from all stored entities it applies to. |
DELETING |
The index is being deleted, and cannot be used by queries. There is an active long-running operation for the index. The index is not updated when writing an entity. Some index data may exist. |
ERROR |
The index was being created or deleted, but something went wrong. The index cannot by used by queries. There is no active long-running operation for the index, and the most recently finished long-running operation failed. The index is not updated when writing an entity. Some index data may exist. |
Methods |
|
---|---|
|
Creates the specified index. |
|
Deletes an existing index. |
|
Gets an index. |
|
Lists the indexes that match the specified filters. |