【问题标题】:Permission denied for creating a search index GAE Geoespacial Query创建搜索索引 GAE 地理空间查询的权限被拒绝
【发布时间】:2016-05-12 02:27:00
【问题描述】:

我已经包含了地理空间查询来检查 GeoPt 是否在 Circle 内,并且我已经为它创建了一个索引。 当我尝试将其部署到 GAE 时,出现以下错误:

Creating an index failed for entity_type: "MyEntity" ancestor: falseProperty {  name: "name"}Property {  name: "location"  mode: 3}: Permission denied for creating a search index

这是我正在执行的代码

        GeoPt center = new GeoPt((float) pLatitude, (float) pLongitude);
        double radius = pDistanceKM*1000;
        Query.Filter f = new StContainsFilter("location", new Circle(center, radius));
        items =  ofy().load().type(MyEntity.class).filter(f).filter("name", tmpName).list();

我已经根据documentation创建了一个索引:

这是我的索引:

    <datastore-index kind="MyEntity"  source="manual">
    <property name="name" />
    <property name="location" mode="geospatial"/>
</datastore-index>

有人知道这个权限是什么吗?

使用 Java 和 Android Studio。

Ps:当我尝试执行代码时,GAE 中的 Logging 建议我使用与我的索引相同的索引

com.google.api.server.spi.SystemService invokeServiceMethod: exception occurred while calling backend method com.google.appengine.api.datastore.DatastoreNeedIndexException: no matching index found. The suggested index for this query is:
<datastore-index kind="MyEntity"  source="manual">
    <property name="name" />
    <property name="location" mode="geospatial"/>
</datastore-index>

【问题讨论】:

    标签: java android google-app-engine geospatial google-cloud-datastore


    【解决方案1】:

    Datastore 的地理空间搜索是 Alpha release,目前已达到容量上限。查看错误,您似乎不是 Alpha 程序的一部分。

    敬请期待对所有人开放的测试版!

    【讨论】:

    • Beta 版的发布日期有吗?
    • 目前还没有测试版发布的日期。
    • @Zeehad 我有机会在测试版发布之前获得邀请吗?我正在开发一个主要关注附近地方的应用程序。我真的很感激。
    • 您是否有任何关于何时开始测试版的信息?
    • 因为它现在处于 alpha 状态已经很长时间了。是否会发布测试版?有什么信息吗?
    猜你喜欢
    • 1970-01-01
    • 2017-03-23
    • 2012-05-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-06-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多