Hi Vinny,

Thanks for help.

i) I used the log error suggest for the datastore-indexes.xml. See log 
error:

---- start log error ---

javax.servlet.ServletContext log: Exception while dispatching incoming RPC call
com.google.gwt.user.client.rpc.SerializationException: Type 
'com.google.appengine.api.datastore.DatastoreNeedIndexException' was not 
included in the set of types which can be serialized by this 
SerializationPolicy or its Class object could not be loaded. For security 
purposes, this type will not be serialized.: instance = 
com.google.appengine.api.datastore.DatastoreNeedIndexException: no matching 
index found.
The suggested index for this query is:
    <datastore-index kind="ItemGroupOptionalQuantities" ancestor="true" 
source="manual">
        <property name="quantityFrom" direction="asc"/>
    </datastore-index>

(...)

----- end log error ----


ii) This is my query. In reality it is a method with parameters. I replaced 
the variables by fixed content.

--- start query ----

Query query = new Query("ItemGroupOptionalQuantities");
query.setAncestor(ancestorKey);
query.addSort("quantityFrom", Query.SortDirection.ASCENDING)

PreparedQuery preparedQuery = datastore.prepare(query);
FetchOptions fetchOptions = FetchOptions.Builder.withLimit(10);
QueryResultList<Entity> entities 
= preparedQuery.asQueryResultList(fetchOptions);

--- end query ---

iii) other information: When I deploy, this index entry was in 
datastore-indexes-auto.xml too, with source="auto". By rule, the index 
should have been generated.

iv) quantityFrom is a Double type. Can do an index from a double type?


Thanks Vinny.




Em sexta-feira, 21 de fevereiro de 2014 03h59min45s UTC-3, Vinny P escreveu:
>
> On Thu, Feb 20, 2014 at 8:53 AM, David <[email protected] <javascript:>>
>  wrote:
>
>> I inserted a new index in the datastore-indexes.xml, as below:
>> <datastore-index kind="ItemGroupOptionalQuantities" ancestor="true" 
>> source="manual">
>>         <property name="quantityFrom" direction="asc"/>
>> </datastore-index>
>> It doesn't work. I'm getting a msg "DatastoreNeedIndexException: no 
>> matching index found."
>>
>
>
>
> Generally that means the query you're attempting doesn't match the indexes 
> you've specified in datastore-indexes.xml. Can you post the code for your 
> query?
>
> Alternately you can try updating only the datastore indexes by calling 
> appcfg update_indexes. Here's the documentation: 
> https://developers.google.com/appengine/docs/java/tools/uploadinganapp#Updating_Indexes
>  
>
>  
> -----------------
> -Vinny P
> Technology & Media Advisor
> Chicago, IL
>
> App Engine Code Samples: http://www.learntogoogleit.com
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to