Hi, Thank you...

 And how can i change the index to "descending" then ???
 The query works just fine on my local machine. There the following
datastore-indexes-auto.xml is generated:

<!-- Indices written at Thu, 9 Dec 2010 11:00:36 UTC -->

<datastore-indexes>

    <!-- Used 27 times in query history -->
    <datastore-index kind="Purchase" ancestor="false" source="auto">
        <property name="groupname" direction="asc"/>
        <property name="date" direction="asc"/>
    </datastore-index>

    <!-- Used 270 times in query history -->
    <datastore-index kind="Item" ancestor="true" source="auto">
        <property name="items_INTEGER_IDX" direction="asc"/>
    </datastore-index>

    <!-- Used 27 times in query history -->
    <datastore-index kind="Purchase" ancestor="true" source="auto">
        <property name="purchases_INTEGER_IDX" direction="asc"/>
    </datastore-index>

    <!-- Used 1 time in query history -->
    <datastore-index kind="Purchase" ancestor="false" source="auto">
        <property name="groupname" direction="asc"/>
        <property name="date" direction="desc"/>
    </datastore-index>

</datastore-indexes>


On Dec 9, 11:49 am, ping2r...@gmail.com wrote:
> You have ascending index but not desc, so just create(submit) those index 
> definition and wait while index will be created. Once created ur both query 
> will run fine.
>
> Sent from my BlackBerry® wireless device
>
>
>
>
>
>
>
> -----Original Message-----
> From: ping <bernd.warm...@gmail.com>
>
> Sender: google-appengine@googlegroups.com
> Date: Thu, 9 Dec 2010 02:45:26
> To: Google App Engine<google-appengine@googlegroups.com>
> Reply-To: google-appengine@googlegroups.com
> Subject: [google-appengine] ascending ordering vs. descending ordering
>
> Hi :)
>
> What could be the reason that following query works fine with "asc"
> ordering and not with "desc" ???
>
> Query query = pm.newQuery(Purchase.class);
> query.setFilter("groupname == groupnameParameter");
> query.declareParameters("String groupnameParameter");
> query.setOrdering("date asc");
>
> in the log of the gae i read the following exception when i run the
> code with descending ordering :
>
> com.google.appengine.api.datastore.DatastoreNeedIndexException: no
> matching index found..      <datastore-index kind="Purchase"
> ancestor="false" source="manual">
>         <property name="groupname" direction="asc"/>
>         <property name="date" direction="desc"/>
>     </datastore-index>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" group.
> To post to this group, send email to google-appeng...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/google-appengine?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to