Google Appengine Datastore filter and sort direction together
I am trying to use the below SQL query in datastore Select *from users where catagory="A" ODER BY id. I tried the below code DatastoreService ds = DatastoreServiceFactory.getDatastoreService(); Filter filter=new FilterPredicate("catagory", FilterOperator.EQUAL, "A"); Query q = new Query("users"); q.setFilter(filter); q.addSort("id", SortDirection.DESCENDING); The setfilter() and addsort() functions are not working together. Any suggestion will be appreciated.
From Class DatastoreNeedIndexException: DatastoreNeedIndexException is thrown when no matching index was found for a query requiring an index. Check the Indexes page in the Admin Console and your datastore-indexes.xml file. In many cases the development server creates the necessary indexes automatically when your app requires them. See Creating indexes using the development server. But in some cases the automatic index updates don't happen. In such cases you need to create/update the indexes manually. See Creating indexes manually. Updating the indexes on GAE also happens most of the time automatically, when the app code is deployed, but occasionally they need to be updated manually. From Updating indexes: ./appengine-java-sdk/bin/appcfg.sh update_indexes myapp/war After the GAE indexes are updated it may take a while for them to get in serving state. Until that state is reached the same error can be seen. Check the status of the app's indexes in the developer's console. Also mentioned in Updating indexes.
appengine 22.214.171.124.jar creates Unknown Google App Engine prob
Message failure in channel api
Is there a way to know when a set of app engine task queue tasks have completed?
Best way to model my classes?
List of keys or separate model?
WTForms not working on Google App Engine 1.6.1 & Python 2.7
Google app engine and application scope data
Do composite index updates maintain same order as original updates
What is template expansion and how can we reduce it if our google app engine application?
Writing to an appengine blob asynchronously and finalizing it when all tasks complete
null pointer exception in indexwriter.close (using ramdirectory in google app engine)
Deploy to AppEngine without changing the GWT files
JDO and Google App Engine datastore: key representation in code
Using appspot.com as a partial domain cookie
Nested entity groups in HRD datastore
What is the maximum computational throughput gain on Azure?