【发布时间】:2012-08-02 21:16:42
【问题描述】:
我的 datastore-indexes.xml 如下所示:
<datastore-index kind="Book" ancestor="false" source="auto">
<property name="^i" direction="asc"/>
<property name="nurInRange2" direction="asc"/>
<property name="firstModificationDate" direction="desc"/>
</datastore-index>
数据存储管理控制台实际上在数据/数据存储索引下显示了这一点:
^i ▲ , nurInRange2 ▲ , firstModificationDate ▼ : serving
但是,当我转到数据存储查看器并执行 by gql 查询时:
SELECT * FROM Book where nurInRange2 = True order by firstModificationDate DESC
我收到以下回复:
no matching index found.
The suggested index for this query is:
- kind: Book
properties:
- name: nurInRange5
- name: firstModificationDate
direction: desc
我有什么明显的遗漏吗?我的索引公式有什么问题吗?
【问题讨论】:
-
什么是 ^i 属性(在索引中)为什么它在那里?它不是建议索引的一部分。你需要一个没有它的新索引。
-
@Shay: ^i 属性(很可能)是 Objectify 生成的属性,需要多态性:code.google.com/p/objectify-appengine/wiki/…
-
10x @PeterKnego 我从未使用过 Objectify。
标签: google-app-engine google-cloud-datastore gql gqlquery