Yes, that is the correct doc for the Java indexes. Regarding your GQL query, the name of the kind is not the full name of the class (including the package) but the simple name. So try using MDsIri instead of com.col.server. MDsIri. You should be able to see any entities you saved in the data viewer and the valid kind names are provided in the drop down.
- Jason On Fri, Oct 30, 2009 at 12:05 PM, Pion <[email protected]> wrote: > > 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 <[email protected]> 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 [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-java?hl=en -~----------~----~----~----~------~----~------~--~---
