Thanks for posting your questions here regarding JPA @Index support. Though it's not explicitly stated in the documentation <https://cloud.google.com/appengine/docs/java/datastore/jpa/overview-dn2> as an unsupported feature of JPA, it is not mentioned anywhere or given as an example. Given that JPA was designed primarily with traditional relational databases in mind, I don't expect this feature to be integrated. The documentation above has labeled JPA as a superseded storage solution while advising users to use the lower-level Datastore API directly or a library built for Datastore like Objectify <https://github.com/objectify/objectify>.
If you do not intend to migrate over to such a library, you could instead take advantage of datastore-indexes.xml to configure your indexes as recommended in this Index configuration <https://cloud.google.com/appengine/docs/java/datastore/indexes#Java_Index_configuration> article. An example can be found here <https://cloud.google.com/appengine/docs/java/config/indexconfig> detailing how this XML file should be structured to be used by App Engine. Note that one could also use the development server to generate an index configuration file. Rather than throwing exceptions, the development server will generate indexes when attempting a query that requires one. This can be very useful if your development tests include all the query possibilities you might encounter. I hope this helps! On Monday, April 18, 2016 at 6:07:54 AM UTC-4, Deepesh Mathuria wrote: > > I've used JPA to persist the data into GAE Datastore and I've annotated > the fields to be indexed in my Entity classes with @Index but when > deployed, the DataStore auto Indexeing does not index all the fields which > I annotated and therefore when I query it results into > DataStoreIndexNotFoundException. > Suggest the ways to rectify this > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/e55f3f94-3cc6-48f1-85b9-1735717f1ad3%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
