我想测试我在Google数据存储区中创建的新实体 . 我正在尝试使用不等式执行GQL查询来检索数据存储区Web界面中的某些实体:
SELECT * FROM UserMatchingIndex WHERE age <25 AND wants_male = false AND wants_dating = false AND wants_friendship = false AND wants_age = 20
但我总是有一个错误:“GQL查询错误:您的数据存储区没有此查询所需的复合索引(开发人员提供的) . ”而我已经定义了所需的复合索引!
UserMatchingIndex:年龄▲wants_male▲want_dating▲want_friendship▲want_age▲服务UserMatchingIndex:年龄▲want_female▲want_dating▲want_friendship▲want_age▲服务
这些在index.yaml中定义如下:
- kind: UserMatchingIndex
ancestor: no
properties:
- name: age
- name: wants_male
- name: wants_dating
- name: wants_friendship
- name: wants_age
- kind: UserMatchingIndex
ancestor: no
properties:
- name: age
- name: wants_female
- name: wants_dating
- name: wants_friendship
- name: wants_age
我真的不明白什么可能是错的......我已经为其他实体多次这样做了 . 如果你有一些线索,欢迎你 .
1 回答
此问题已提交给Google Cloud支持,这似乎是他们自己的问题,或者至少是尚未记录的限制 . 更改属性的顺序如下:
使查询工作 .
EDIT: Answer from Google Support
应尽快记录此限制 .