【问题标题】:single-property GQL causes unexpected composite index单属性 GQL 导致意外的复合索引
【发布时间】:2012-05-26 03:18:31
【问题描述】:

如果我执行这个 GQL 查询:

GQLQuery("SELECT user FROM MyUser WHERE foo = :1", fooz)

这将导致我的 index.yaml 使用 userfoo 属性创建一个复合索引。

- kind: MyUser
  properties:
  - name: user
  - name: foo

如果我删除该索引,当它上传到 App Engine 并且我的应用运行时,会出现错误 no matching index found.

我只是不明白为什么 GAE 必须为那个查询创建一个复合索引??

【问题讨论】:

    标签: google-app-engine google-cloud-datastore gql


    【解决方案1】:

    这种行为是fully documented here:

    投影查询要求将投影中指定的所有属性都包含在数据存储索引中。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-03-22
      • 2023-03-26
      • 1970-01-01
      • 2016-09-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-12-25
      相关资源
      最近更新 更多