Then it must be ur recent change and indexes have not been exploded. Go to GAE 
dashboard and see if you can see all indexes there. May be status of this index 
where u want date as desc is still in pending or building.

Sent from my BlackBerry® wireless device

-----Original Message-----
From: ping <[email protected]>
Sender: [email protected]
Date: Thu, 9 Dec 2010 03:07:28 
To: Google App Engine<[email protected]>
Reply-To: [email protected]
Subject: [google-appengine] Re: ascending ordering vs. descending ordering

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, [email protected] 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 <[email protected]>
>
> Sender: [email protected]
> Date: Thu, 9 Dec 2010 02:45:26
> To: Google App Engine<[email protected]>
> Reply-To: [email protected]
> 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 [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to