GAE上传web app出现索引错误
最近上传google app engine时可能遇到的下面的错误。
Error 400: --- begin server output ---
Creating a composite index failed: An index may not be comprised of a
single repeated property. Your query probably doesn't need this
index. Try without it!
错误原因:开发阶段使用过一些对单属性的排序读取数据,由本地app server记下了查询历史,自动生成了这些索引。每次在本地运行该app时都会自动生成这个索引。新的SDK出来后不支持这些单属性的索引,上传出错。希望新版本的app engine SDK会解决这个问题。
解决方法:直接把index.yaml中自动产生的些单属性索引信息删除,就能上传正确。如果在本地运行调试过了,下次上传app时都要这么做。
注意:不能把那些用到的两个以上属性的索引删除了,可能会出现上传成功,但浏览站点时得到的是500错误信息。
注:转载请注明出处http://www.kgblog.net
# Used 16 times in query history.
- kind: Comment
properties:
- name: date
direction: desc
其中一个name表示一个属性,只要把这种只有一个name的索引删除就行了。有两个或以上个name的索引保留。
如果你删错了也不怕,本地测试一下系统又会生成一个新的index.yaml。
# Used 18 times in query history.
- kind: AccessDestination
properties:
- name: counter
direction: desc
# Used 15 times in query history.
- kind: AccessFrom
properties:
- name: counter
direction: desc
因为看到楼主的单属性和双属性看的不是太清楚,错误代码如下:
Error 400: --- begin server output ---
Creating a composite index failed: This index:
entity_type: "AccessDestination"
ancestor: false
Property {
name: "counter"
direction: 2
}
求详细解决方法,希望楼主能看见
# Used 18 times in query history.
- kind: AccessDestination
properties:
- name: counter
direction: desc
# Used 15 times in query history.
- kind: AccessFrom
properties:
- name: counter
direction: desc
因为看到楼主的单属性和双属性看的不是太清楚,错误代码如下:
Error 400: --- begin server output ---
Creating a composite index failed: This index:
entity_type: "AccessDestination"
ancestor: false
Property {
name: "counter"
direction: 2
}
求详细解决方法,希望楼主能看见
# Used 18 times in query history.
- kind: AccessDestination
properties:
- name: counter
direction: desc
# Used 15 times in query history.
- kind: AccessFrom
properties:
- name: counter
direction: desc
因为看到楼主的单属性和双属性看的不是太清楚,错误代码如下:
Error 400: --- begin server output ---
Creating a composite index failed: This index:
entity_type: "AccessDestination"
ancestor: false
Property {
name: "counter"
direction: 2
}
求详细解决方法,希望楼主能看见
# Used 18 times in query history.
- kind: AccessDestination
properties:
- name: counter
direction: desc
# Used 15 times in query history.
- kind: AccessFrom
properties:
- name: counter
direction: desc
因为看到楼主的单属性和双属性看的不是太清楚,错误代码如下:
Error 400: --- begin server output ---
Creating a composite index failed: This index:
entity_type: "AccessDestination"
ancestor: false
Property {
name: "counter"
direction: 2
}
求详细解决方法,希望楼主能看见