[google-appengine] Re: Index problem with GAE for Java
Nope, that throws a different error: Identifier expected at character 1 in "*" On Nov 9, 10:43 am, Jeff Schwartz wrote: > Try: > > select * from HospitalData where Version = '1' order by Hospital_Name asc > > Jeff > > > > On Tue, Nov 9, 2010 at 11:16 AM, Rmac wrote: > > Thanks Jeff... here you go... > > > *The string query supplied to the Query: * > > > select from myPackage.HospitalData where Version == '1' order by > > Hospital_Name asc > > > *The GAE response:* > > no matching index found.. > ancestor="false" source="manual"> > > > > > > > > > *Those entries are in the datastore-indexes.xml file and show up on the > > admin console as below:* > > HospitalData > > Version ▲,Hospital_Name▲,City▲,State▲,ZIP_Code▲,Hospital_Type▲ > > > If I leave off the "where Version == '1'" the query works (or if I use > > Hospital_Name in the where instead). Currently, all entities have a > > property value of 1 for Version. This shouldn't be so difficult to figure > > out for a simple example like this! > > > Thanks for any feedback. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google App Engine" group. > > To post to this group, send email to google-appeng...@googlegroups.com. > > To unsubscribe from this group, send email to > > google-appengine+unsubscr...@googlegroups.com > > . > > For more options, visit this group at > >http://groups.google.com/group/google-appengine?hl=en. > > -- > Jeff -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Index problem with GAE for Java
Using Java and JDO. The package path is needed... fails without that. As I said earlier, it will work if I remove the where clause (or use a different property) so I am able to connect to the datastore and pull data. I can even look at the data from the Admin console so it is there and accessible. I just can't seem to get some query related indexes to work. I've been all OVER the Google docs researching this... it's a bit convoluted and you have to piece information together from several places. I originally didn't want to use either JDO or JPA, but am using the open source geomodel software to do a proximity search on geo- coordinates in the data and that code requires JDO. Frustrating that something so simple can be so difficult. Thanks for your ideas. On Nov 9, 1:59 pm, Jeff Schwartz wrote: > Should have asked what language you are using (Java or Python) as well as > if you are using jdo/jpa etc. > > The entity type you are querying - myPackage.HospitalData - is the > 'myPackage' part a package name? If so, why? The datastore doesn't know > about packages, it only knows about Entity types which are named. > > When you go into either production or dev console can you see the entities > you are querying for? The name they are listed under is their entity type > and that is the name you should use in your queries. > > Google's datastore docs are very good & provide a lot of information about > querying & indexes. > > If you are using JPA/JDO (that's assuming you are using Java) along with > datanucleus may I suggest you don't because the datastore is not SQL which > these 2 technologies are really geared towards and only serve IMO at least > to confuse the issue. Look into replacing it with a datastore centric ORM. I > personally use Objectify & I swear by it. > > Jeff > > > > On Tue, Nov 9, 2010 at 2:30 PM, Rmac wrote: > > Nope, that throws a different error: Identifier expected at character > > 1 in "*" > > > On Nov 9, 10:43 am, Jeff Schwartz wrote: > > > Try: > > > > select * from HospitalData where Version = '1' order by Hospital_Name asc > > > > Jeff > > > > On Tue, Nov 9, 2010 at 11:16 AM, Rmac wrote: > > > > Thanks Jeff... here you go... > > > > > *The string query supplied to the Query: * > > > > > select from myPackage.HospitalData where Version == '1' order by > > Hospital_Name asc > > > > > *The GAE response:* > > > > no matching index found.. > ancestor="false" source="manual"> > > > > > > > > > > > > > > > > > *Those entries are in the datastore-indexes.xml file and show up on the > > admin console as below:* > > > > HospitalData > > > > Version ▲,Hospital_Name▲,City▲,State▲,ZIP_Code▲,Hospital_Type▲ > > > > > If I leave off the "where Version == '1'" the query works (or if I use > > Hospital_Name in the where instead). Currently, all entities have a > > property value of 1 for Version. This shouldn't be so difficult to figure > > out for a simple example like this! > > > > > Thanks for any feedback. > > > > > -- > > > > You received this message because you are subscribed to the Google > > Groups > > > > "Google App Engine" group. > > > > To post to this group, send email to google-appengine@googlegroups.com > > . > > > > To unsubscribe from this group, send email to > > > > google-appengine+unsubscr...@googlegroups.com > > > > > > > . > > > > For more options, visit this group at > > > >http://groups.google.com/group/google-appengine?hl=en. > > > > -- > > > Jeff > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google App Engine" group. > > To post to this group, send email to google-appeng...@googlegroups.com. > > To unsubscribe from this group, send email to > > google-appengine+unsubscr...@googlegroups.com > > . > > For more options, visit this group at > >http://groups.google.com/group/google-appengine?hl=en. > > -- > Jeff -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: Index problem with GAE for Java
Should have asked what language you are using (Java or Python) as well as if you are using jdo/jpa etc. The entity type you are querying - myPackage.HospitalData - is the 'myPackage' part a package name? If so, why? The datastore doesn't know about packages, it only knows about Entity types which are named. When you go into either production or dev console can you see the entities you are querying for? The name they are listed under is their entity type and that is the name you should use in your queries. Google's datastore docs are very good & provide a lot of information about querying & indexes. If you are using JPA/JDO (that's assuming you are using Java) along with datanucleus may I suggest you don't because the datastore is not SQL which these 2 technologies are really geared towards and only serve IMO at least to confuse the issue. Look into replacing it with a datastore centric ORM. I personally use Objectify & I swear by it. Jeff On Tue, Nov 9, 2010 at 2:30 PM, Rmac wrote: > Nope, that throws a different error: Identifier expected at character > 1 in "*" > > On Nov 9, 10:43 am, Jeff Schwartz wrote: > > Try: > > > > select * from HospitalData where Version = '1' order by Hospital_Name asc > > > > Jeff > > > > > > > > On Tue, Nov 9, 2010 at 11:16 AM, Rmac wrote: > > > Thanks Jeff... here you go... > > > > > *The string query supplied to the Query: * > > > > > select from myPackage.HospitalData where Version == '1' order by > Hospital_Name asc > > > > > *The GAE response:* > > > no matching index found.. ancestor="false" source="manual"> > > > > > > > > > > > > > > *Those entries are in the datastore-indexes.xml file and show up on the > admin console as below:* > > > HospitalData > > > Version ▲,Hospital_Name▲,City▲,State▲,ZIP_Code▲,Hospital_Type▲ > > > > > If I leave off the "where Version == '1'" the query works (or if I use > Hospital_Name in the where instead). Currently, all entities have a > property value of 1 for Version. This shouldn't be so difficult to figure > out for a simple example like this! > > > > > Thanks for any feedback. > > > > > -- > > > You received this message because you are subscribed to the Google > Groups > > > "Google App Engine" group. > > > To post to this group, send email to google-appengine@googlegroups.com > . > > > To unsubscribe from this group, send email to > > > google-appengine+unsubscr...@googlegroups.com > > > > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/google-appengine?hl=en. > > > > -- > > Jeff > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to google-appeng...@googlegroups.com. > To unsubscribe from this group, send email to > google-appengine+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > > -- Jeff -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: Index problem with GAE for Java
Sorry, I didn't realize at first that you were using jdo and so you are correct, jdo will require package names for the pojo entity. However, you might want to rethink using that particular geomodel implementation if it requires jdo and select one that allows you more flexibility in you architecture. Using JDO with the data store is like trying to fit a square peg into a round hole; you might eventually get it in but it imposes a paradigm that doesn't match the underlying architecture of the data store. Just my opinion of course but getting your library stack right will make a big difference through out the life of your project. Jeff On Tue, Nov 9, 2010 at 3:27 PM, Rmac wrote: > Using Java and JDO. The package path is needed... fails without > that. As I said earlier, it will work if I remove the where clause > (or use a different property) so I am able to connect to the datastore > and pull data. I can even look at the data from the Admin console so > it is there and accessible. I just can't seem to get some query > related indexes to work. > > I've been all OVER the Google docs researching this... it's a bit > convoluted and you have to piece information together from several > places. > > I originally didn't want to use either JDO or JPA, but am using the > open source geomodel software to do a proximity search on geo- > coordinates in the data and that code requires JDO. > > Frustrating that something so simple can be so difficult. > > Thanks for your ideas. > > > > On Nov 9, 1:59 pm, Jeff Schwartz wrote: > > Should have asked what language you are using (Java or Python) as well > as > > if you are using jdo/jpa etc. > > > > The entity type you are querying - myPackage.HospitalData - is the > > 'myPackage' part a package name? If so, why? The datastore doesn't know > > about packages, it only knows about Entity types which are named. > > > > When you go into either production or dev console can you see the > entities > > you are querying for? The name they are listed under is their entity type > > and that is the name you should use in your queries. > > > > Google's datastore docs are very good & provide a lot of information > about > > querying & indexes. > > > > If you are using JPA/JDO (that's assuming you are using Java) along with > > datanucleus may I suggest you don't because the datastore is not SQL > which > > these 2 technologies are really geared towards and only serve IMO at > least > > to confuse the issue. Look into replacing it with a datastore centric > ORM. I > > personally use Objectify & I swear by it. > > > > Jeff > > > > > > > > On Tue, Nov 9, 2010 at 2:30 PM, Rmac wrote: > > > Nope, that throws a different error: Identifier expected at character > > > 1 in "*" > > > > > On Nov 9, 10:43 am, Jeff Schwartz wrote: > > > > Try: > > > > > > select * from HospitalData where Version = '1' order by Hospital_Name > asc > > > > > > Jeff > > > > > > On Tue, Nov 9, 2010 at 11:16 AM, Rmac wrote: > > > > > Thanks Jeff... here you go... > > > > > > > *The string query supplied to the Query: * > > > > > > > select from myPackage.HospitalData where Version == '1' order by > > > Hospital_Name asc > > > > > > > *The GAE response:* > > > > > no matching index found.. > > ancestor="false" source="manual"> > > > > > > > > > > > > > > > > > > > > > > *Those entries are in the datastore-indexes.xml file and show up on > the > > > admin console as below:* > > > > > HospitalData > > > > > Version ▲,Hospital_Name▲,City▲,State▲,ZIP_Code▲,Hospital_Type▲ > > > > > > > If I leave off the "where Version == '1'" the query works (or if I > use > > > Hospital_Name in the where instead). Currently, all entities have a > > > property value of 1 for Version. This shouldn't be so difficult to > figure > > > out for a simple example like this! > > > > > > > Thanks for any feedback. > > > > > > > -- > > > > > You received this message because you are subscribed to the Google > > > Groups > > > > > "Google App Engine" group. > > > > > To post to this group, send email to > google-appengine@googlegroups.com > > > . > > > > > To unsubscribe from this group, send email to > > > > > google-appengine+unsubscr...@googlegroups.com > > > > > > > > > > > > > > > > . > > > > > For more options, visit this group at > > > > >http://groups.google.com/group/google-appengine?hl=en. > > > > > > -- > > > > Jeff > > > > > -- > > > You received this message because you are subscribed to the Google > Groups > > > "Google App Engine" group. > > > To post to this group, send email to google-appengine@googlegroups.com > . > > > To unsubscribe from this group, send email to > > > google-appengine+unsubscr...@googlegroups.com > > > > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/google-appengine?hl=en. > > > > -- > > Jeff > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, se