I found this 
http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html#Defining_Indexes_With_Configuration
with the following example:
<?xml version="1.0" encoding="utf-8"?>
<datastore-indexes
  xmlns="http://appengine.google.com/ns/datastore-indexes/1.0";
  autoGenerate="true">
    <datastore-index kind="Person" ancestor="false">
        <property name="lastName" direction="asc" />
        <property name="height" direction="desc" />
    </datastore-index>
</datastore-indexes>

But I still cannot solve my query error.

On Oct 30, 9:34 am, Pion <onlee2...@gmail.com> wrote:
> I just deployedmy app to the GAE for the first time.
>
> I went to the Admin Console -> DataStore -> Indexes which says, "You
> have not created indexes for this application. Some types of queries
> require an index to be built. You can manage your indexes in an
> index.yaml file. Learn more 
> abouthttp://code.google.com/appengine/kb/general.html#indexes
> ".
>
> http://code.google.com/appengine/kb/general.html#indexeslinks 
> tohttp://code.google.com/appengine/docs/python/datastore/queriesandinde....
> It seems to be Python specific.
>
> What's the corresponding one on Java? It seems to be on war\WEB-INF
> \appengine-generated\datastore-indexes.xml. Please correct me if I am
> wrong. My datastore-indexes.xml is empty.
>
> <?xml version="1.0" encoding="utf-8"?>
> <datastore-indexes  autoGenerate="true">
>
> </datastore-indexes>
>
> Also, I didi the following:
>
> o Go to the Admin Console -> DataStore -> Data Viewer. It displays my
> low-level datastore contents.
> o Click the "Query (using GQL)". It displays "SELECT * FROM
> com.col.server.MDsIri" automatically by default.
> o Click "Run Query" button
> o It says, "Invalid GQL query string."
>
> I suspect because I do not have any indexes yet.
>
> What are the syntax to populate datastore-indexes.xml so I can do the
> above query.
>
> Thanks in advance for your help.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to