简体   繁体   English

com.google.appengine.api.datastore.DatastoreNeedIndexException:找不到匹配的索引

[英]com.google.appengine.api.datastore.DatastoreNeedIndexException: no matching index found

I am getting the following exception when I am deploying my APP of Google App Engine server with Objectify, although I have already configured all the indexes of my application. 使用Objectify部署Google App Engine服务器的APP时遇到以下异常,尽管我已经配置了应用程序的所有索引。 Still didn't understand why I am getting this exception, due to this error, I am not able to do anything on this web application. 仍然不明白为什么我会收到此异常,由于此错误,我无法在此Web应用程序上执行任何操作。

Exception in Production Server 生产服务器中的异常

/search
com.google.appengine.api.datastore.DatastoreNeedIndexException: no matching index found.
The suggested index for this query is:
<datastore-index kind="M_TAXI" ancestor="false" source="manual">
    <property name="cityName" direction="asc"/>
    <property name="updatedOn" direction="asc"/>
</datastore-index>

datastore.indexes.xml datastore.indexes.xml

<?xml version="1.0" encoding="UTF-8"?>
<datastore-indexes autoGenerate="true">
<datastore-index kind="M_COUNTRY" ancestor="false" source="auto">
 <property name="countryCode" direction="asc" />
 <property name="countryName" direction="asc" />
 <property name="active" direction="asc" />
</datastore-index>
<datastore-index kind="M_CITY" ancestor="false" source="auto">
 <property name="countryCode" direction="asc" />
 <property name="cityName" direction="asc" />
 <property name="cityCode" direction="asc" />
 <property name="active" direction="asc" />
</datastore-index>
<datastore-index kind="M_TAXI" ancestor="false" source="auto">
 <property name="cityName" direction="asc" />
 <property name="supplierUserName" direction="asc" />
 <property name="updatedOn" direction="asc" />
 <property name="active" direction="asc" />
 <property name="countryName" direction="asc" />
</datastore-index>
</datastore-indexes>

Datastore index image snapshot from production server 来自生产服务器的数据存储索引图像快照

数据存储索引图像快照

The existing M_TAXI is not usable by the query that threw the exception. 抛出异常的查询无法使用现有的M_TAXI。 Please try inserting 请尝试插入

<datastore-index kind="M_TAXI" ancestor="false" source="manual">
    <property name="cityName" direction="asc"/>
    <property name="updatedOn" direction="asc"/>
</datastore-index>

into datastore.indexes.xml before the </datastore-indexes> end tag and after the other M_TAXI element, and report back what the result was. 在</ datastore-indexes>结束标记之前和之后的另一个M_TAXI元素之前的datastore.indexes.xml中,并报告结果是什么。

You must add these index in your datastore.indexes.xml 您必须在datastore.indexes.xml添加这些索引

<datastore-index kind="M_TAXI" ancestor="false" source="manual">
    <property name="cityName" direction="asc"/>
    <property name="updatedOn" direction="asc"/>
</datastore-index>

As Appengine datastore is schemaless, you must need to add seperate indexes for different query. 由于Appengine数据存储区是无架构的,因此您必须为不同的查询添加单独的索引。

Please refer this stackoverflow post . 请参阅此stackoverflow帖子

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 示例应用中的com.google.appengine.api.datastore.DatastoreNeedIndexException错误 - com.google.appengine.api.datastore.DatastoreNeedIndexException error in Sample App DatastoreNeedIndexException:找不到匹配的索引。 使用Objectify - DatastoreNeedIndexException: no matching index found. Using Objectify AppEngine ClassNotFoundException:com.google.appengine.api.datastore.DatastoreServiceFactory - AppEngine ClassNotFoundException: com.google.appengine.api.datastore.DatastoreServiceFactory com.google.appengine.api.datastore.DatastoreFailureException:意外失败 - com.google.appengine.api.datastore.DatastoreFailureException: Unexpected failure java.lang.NoClassDefFoundError: com/google/appengine/api/datastore/AsyncDatastoreService - java.lang.NoClassDefFoundError: com/google/appengine/api/datastore/AsyncDatastoreService 如何在数据库中存储“ com.google.appengine.api.datastore.Text” - How to store “com.google.appengine.api.datastore.Text” in database 将属性设置为com.google.appengine.api.datastore.Entity - Setting a property to com.google.appengine.api.datastore.Entity 如何使用com.google.appengine.api.datastore.Text - how to use com.google.appengine.api.datastore.Text 库appengine.api.datastore和com.google.cloud.datastore有什么区别? - What is the difference between libraries appengine.api.datastore and com.google.cloud.datastore? Java-Google Cloud Datastore-不相等返回“找不到匹配的索引” - java - Google Cloud Datastore - Inequality returning “no matching index found”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM