Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google cloud platform Google云数据存储中的复合索引_Google Cloud Platform_Google Cloud Datastore_Gql_Gqlquery_Composite Index - Fatal编程技术网

Google cloud platform Google云数据存储中的复合索引

Google cloud platform Google云数据存储中的复合索引,google-cloud-platform,google-cloud-datastore,gql,gqlquery,composite-index,Google Cloud Platform,Google Cloud Datastore,Gql,Gqlquery,Composite Index,我有一个名字叫“Wdr”。我的index.yaml文件如下所示 indexes: -kind: Wdr ancestor: yes properties: -name : wdr_id -name : wdr_sub_id direction: desc 我无法运行下面的gql查询 SELECT * FROM Wdr where wdr_id = '1098' order by wdr_sub_id desc 我得到的是 GQL Query error: Your Datas

我有一个名字叫“Wdr”。我的index.yaml文件如下所示

indexes:
-kind: Wdr
 ancestor: yes
 properties:
 -name : wdr_id
 -name : wdr_sub_id
  direction: desc
我无法运行下面的gql查询

SELECT * FROM  Wdr where wdr_id = '1098' order by wdr_sub_id desc 
我得到的是

GQL Query error: Your Datastore does not have the composite index (developer-supplied) required for this query.

.yaml文件中定义的索引是否不正确?还是我在这里做错了什么?

您的索引定义包含祖先:是的,这意味着您的查询应该包含祖先筛选器。您可以将祖先过滤器添加到查询中,或者将索引定义更改为
祖先:no

'SELECT*from
Wdr
其中key有祖先键(Tan,'f347e5bd-8204-4ff1-b7a5-ae2b65a7ac38')按焊工顺序_sub id asc'此查询也不起作用'SELECT*from
Wdr
其中key有祖先键(Tan,'f347efbd-8204-4ff1-b7a5-aecb65a7ac38')按wd_开始时间asc排序“我应该为此查询添加哪些索引?尝试使用该查询的错误消息应该给出所需的索引。我希望它是
种类:Wdr祖先:是属性:-名称:Wdr_sub_id/wd_开始时间方向:asc