[google-appengine] Re: Bulk Uploading using lot of CPU
okay, after some time i found out i had some 10 indexes defined on the database. after deleting them, the uploading data took cpu down by almost 100% from previous case. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[google-appengine] Trying to get my compiled gwt code to work on appengine-python
The code works fine locally but as soon as I upload the directory and url mappings I get a 500 error. I use a static mapping to map the directory where the gwt code is to a URL path but for some reason appengine doesn't like it. Any ideas? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[google-appengine] Re: Problem installing PIL 1.1.6, on Windows Vista 64 development machine
I had the same problem so I restart my windows vista 32 in safe mode with networking and then i had no problem to install the PIL 1.1.6. On Jun 24, 2:10 pm, Scott wrote: > Hi All, > > I've scoured the internet looking for info to help resolve this > issue. I've also tried a number of things on my local installation to > trying to resolve this issue, but both have been unsuccessful. > > I am encountering an error running the Python Imaging Library 1.1.6 > for Python 2.5 (Windows only) on my local machine. The installer is > giving the following error: "Cannot install" "Python version 2.5 > required, which was not found in the registry". > > I have Python 2.5.4 installed, 64 bit version. I have checked the > registry and it seems to be properly set. Here are the values for a > couple of the keys: > > key name: HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore > \2.5\PythonPath > (Default) value: C:\Python25\Lib;C:\Python25\DLLs;C:\Python25\Lib > \lib-tk > > key name: HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore > \2.5\InstallPath > (Default) value: C:\Python25\ > > I encounter the same issue when running the "setuptools 0.6c9" > installer. > > Any help would be greatly appreciated. > > Thanks, > > Scott --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[google-appengine] Being asked to confirm again...
For some reason I'm being asked to confirm my account again when I go to create a new application. I try re-entering my cell phone number but it tells me it's already been used. Is there anyway to reset my account? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[google-appengine] Re: Can't log in
On Jul 3, 10:21 pm, Richard wrote: > I created an account and uploaded an app today, but now I cannot log > in. When I go tohttp://appengine.google.com/I get this message: > > The page isn't redirecting properly. Firefox has detected that the > server is redirecting the request for this address in a way that will > never complete. > > I have tried clearing my cookies. What I am doing wrong? That seems to have sorted itself out, and now I can log in. But I seem to have two parallel accounts with different apps in each, and sometimes I log in and get one and sometimes I get the other. Very confusing. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[google-appengine] Re: Using Google Apps and App Engine
Andrew, You'll have to have the owner of the domain create a CNAME record (probably at GoDaddy, unless they're using a DNS service from someone else) pointing from www to ghs.google.com. Then, from the Google Apps cpanel for the domain, have them add your application to the domain mapped to the www subdomain (www may already be mapped to Google Sites by default, and this mapping may need to be removed before the app can be added to the www subdomain). On Jul 3, 5:51 pm, andrewljohnson wrote: > Good Afternoon, > > I created a website on my Google App Engine > account:http://pghmetal.appspot.com > > I set this up for a friend, and now I would like to show this website > atwww.pittsburghmetalworks.com > > PittsburghMetalWorks.com is set up as a Google Apps domain, but it's > linked to my friend's account, not my app-engine account. Also, the > domain is registered by GoDaddy. > > So, my question is, how do I usewww.pittsburghmetalworks.comwith > pghmetal.appsot.com > > Thanks for your help. > > Best regards, > Andrew --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[google-appengine] Re: Can't log in
Richard, If the account you're using with App Engine is the one you're posting from, you'll need to go to http://appengine.google.com/a/dancebrighton.com On Jul 3, 5:21 pm, Richard wrote: > I created an account and uploaded an app today, but now I cannot log > in. When I go tohttp://appengine.google.com/I get this message: > > The page isn't redirecting properly. Firefox has detected that the > server is redirecting the request for this address in a way that will > never complete. > > I have tried clearing my cookies. What I am doing wrong? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[google-appengine] Uploading New Version Really Slow
Since the outage of 2 July, updating for all our instance has become really slow. It used to take about 15 seconds, and now more then 3 minutes. Anyone else noticed this too or is it just us? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[google-appengine] Re: how to do reverse full-text search on GAE?
If I was implementing this, I'd probably have an Entity with a reference to the document and a list of keywords, so if I want the list of keywords I just have it already. Clearly this is not how you're storing your keywords, but you don't tell us how you are storing them, just that they exist. What does your model look like? On Jul 3, 4:57 pm, Mr Shore wrote: > Do you really get me right? > > Here is an example to get rid of the pain of abstraction. > > If the document contains these words:'oracle', 'java', 'microsoft', 'ccna' > > and then search these keywords respectively: > 1.java > 2.oracle > 3.notmatch > > then obviously,the 1st and 2nd search will match with the document,but > not the 3rd. > > and now I have 1M keywords ready there,need a way to get all those > matching with the specified document like above. > > I don't want to search 1M times to get the result,though. > > 2009/7/4 Wooble : > > > > > > > On Jul 3, 8:47 am, Mr Shore wrote: > >> By default we search a keyword against many documents. > > >> But now I've restored 1M keywords in datastore, > > >> I want to find out which of 1M keywords match a specified document. > > >> Is there an efficient solution? > > > This depends entirely on your model, which you've told us nothing > > about. > > --http://maishudi.com/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[google-appengine] Bulk Uploading using lot of CPU
Hi, I was using bulk upload to upload some 35K entries. The CPU usages were almost completely used in uploading 5k records. Records have just 7 fields. Any idea why CPU resource time is almost full ? Is there any way to optimize this ? Thanks in advance, Ravindra --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[google-appengine] Re: Error reading objects that have been written
I'll have to take my medicine on this one - my fault. Nothing wrong with the code, no race conditions, and my indexes don't get created with non-existent parents etc. However, I'm currently clearing and restoring my datastore with remote_api, and failed to add the Index entity to the process. Consequently everything was dropped except the index table. In this state, I do have indexes with non-existent parents. Next deployment and db restore, I still had index entries from the previous iteration, without parents. It was this thread that got me worried about the consistency of the GAE datastore - http://groups.google.com/group/google-appengine/browse_thread/thread/34172454df0c6da1/926d4f73bbe90da6 Anyway, sorry about that. Colin On Jul 4, 1:49 am, hawkett wrote: > Hi Nick, > > Glad to hear that I can expect strong consistency. In the > situation described above, I can just leave the tasks to retry until > they succeed, with nothing else happening in the system. We're > talking 6-10 retries over maybe 5 minutes - quite a long time. > Perhaps it was related to the datatsore issues yetserday - I am quite > confident that I had put() the records without error, and the eventual > success of the tasks seems to bear that out. The way my code is > structured, it is not really possible for me to have got hold of the > keys without having first put() the record (even though I do generate > my own key names) - i.e. I'm not doing write-behind, and there > definitely wasn't some other sort of asynch race. I'll watch out for > the behaviour and post back to this thread if I see it again. Thanks, > > Colin > > On Jul 3, 11:17 am, "Nick Johnson (Google)" > wrote: > > > Hi hawkett, > > > The datastore is strongly consistent. If you write a record to the > > datastore, it will be immediately available for reading, everywhere. > > Have you verified (using the admin console, for example) that those > > parent entities do actually exist? > > > -Nick Johnson > > > On Wed, Jul 1, 2009 at 11:54 PM, hawkett wrote: > > > > Hi, > > > > I'm experiencing what appears to be a problem with write > > > propogation - after writing some objects, I am not able to read them. > > > > I'm using the Relational Index pattern outlined in one of Brett's IO > > > talks, and am able to retrieve the Index entities - i.e. > > > > indexKeys = db.GqlQuery( > > > "SELECT __key__ FROM MyIndex " > > > "WHERE myList = :1", value) > > > > keys = [k.parent() for k in indexKeys] > > > logging.info("Keys: %s" % keys) > > > > yields the log output: > > > > [datastore_types.Key.from_path(u'MyObject', u'ABC', _app=u'myapp'), > > > datastore_types.Key.from_path(u'MyObject', u'DEF', _app=u'myapp'), > > > datastore_types.Key.from_path(u'MyObject', u'GHI', _app=u'myapp')] > > > > however > > > > myObjs = db.get(keys) > > > logging.info("objects:%s" % myObjs) > > > > yields the log output: > > > > objects:[None, None, None] > > > > Now I realise that it is not compulsory for the parent keys to > > > actually exist in the db, but in my case those keys were obtained from > > > objects that had been written to the datastore. > > > > Further, I have this behaviour being triggered from the task queue, so > > > the task goes back in the queue a number of times, over perhaps 5 > > > minutes, but eventually succeeds. This would seem to suggest that the > > > writes are taking a very long time to be made available to read. > > > > Should I expect to be able to read an object I have written? I had > > > assumed this was a guaranteed situation. > > > > Thanks, > > > > Colin > > > -- > > Nick Johnson, App Engine Developer Programs Engineer > > Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration > > Number: 368047 --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[google-appengine] Unable to add domain name to app
I have an app running at http://dancingapp.appspot.com/ I want it on its own domain http://www.dancebrighton.com/ This domain is registered with Google Apps. When I try to add the domain to my app it says: An error occurred while trying to install this application. Please try again later What am I doing wrong? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[google-appengine] Re: CRON, big bug today
That was caused by a bug in the Cron scheduling code. I've updated the Cron backends with a fix, so please try redeploying your Cron jobs. thanks, Peter On Jul 3, 7:49 pm, Sylvain wrote: > Sorry to insist but there is no reason for what happened two days > ago ? > > Regards > > On 2 juil, 09:25, Sylvain wrote: > > > Nobody can explain what happened yesterday. > > Currently, I've removed all crons. > > > Regards. > > > On 1 juil, 11:46, broc wrote: > > > > Hi, > > > > Same for me ! > > > > But mycronstore data... and the result for me is: Stored Data quota > > > full => Still full at 99% after having deleted the objects I know... > > > I don't know what are the other objects that take the 99%... > > > > Please help needed ! > > > > On 1 juil, 09:14, Sylvain wrote: > > > > > Hi, > > > > > Today, since 6:00 (PARIS), mycronis running each second. > > > > Thiscronmust run only once a day : > > > > >cron: > > > > - description: reminder by mail > > > > url: /reminder > > > > schedule: every day 06:00 > > > > timezone: Europe/Paris > > > > > Thiscronworks fine since 15 days without any issue. > > > > > Thiscronsent a mail, so now my quota is gone (not very important), > > > > but I think there is a big issue today. > > > > > my app : tools-expertys > > > > >Croninfo in my Dashboard : > > > >CronJobSchedule/Last Run/Last Status (All times are UTC) > > > > /reminder > > > > reminder by mail every day 06:00 (Europe/Paris) > > > > 2009/07/01 09:00:02 0 day late Success > > > > > As you can see the last success = 09:00, but it should run only at > > > > 6:00 --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[google-appengine] Using Google Apps and App Engine
Good Afternoon, I created a website on my Google App Engine account: http://pghmetal.appspot.com I set this up for a friend, and now I would like to show this website at www.pittsburghmetalworks.com PittsburghMetalWorks.com is set up as a Google Apps domain, but it's linked to my friend's account, not my app-engine account. Also, the domain is registered by GoDaddy. So, my question is, how do I use www.pittsburghmetalworks.com with pghmetal.appsot.com Thanks for your help. Best regards, Andrew --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[google-appengine] Can't log in
I created an account and uploaded an app today, but now I cannot log in. When I go to http://appengine.google.com/ I get this message: The page isn't redirecting properly. Firefox has detected that the server is redirecting the request for this address in a way that will never complete. I have tried clearing my cookies. What I am doing wrong? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[google-appengine] Re: how to do reverse full-text search on GAE?
Do you really get me right? Here is an example to get rid of the pain of abstraction. If the document contains these words:'oracle', 'java', 'microsoft', 'ccna' and then search these keywords respectively: 1.java 2.oracle 3.notmatch then obviously,the 1st and 2nd search will match with the document,but not the 3rd. and now I have 1M keywords ready there,need a way to get all those matching with the specified document like above. I don't want to search 1M times to get the result,though. 2009/7/4 Wooble : > > > > On Jul 3, 8:47 am, Mr Shore wrote: >> By default we search a keyword against many documents. >> >> But now I've restored 1M keywords in datastore, >> >> I want to find out which of 1M keywords match a specified document. >> >> Is there an efficient solution? > > This depends entirely on your model, which you've told us nothing > about. > > > -- http://maishudi.com/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[google-appengine] Problem with "Verify Your Account by SMS"
I have a problem with "Verify Your Account by SMS" page. Does anyone know how to verify one's account if you are living in Argentina? I entered my number in the format required by the verificator but it always gives "Mobile Number or Username" error. Regards, Víctor --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[google-appengine] Re: how can I use the "ID/Name" property?
fixed. because ID is not a property of the 'Postings' kind. I should use KEY function in the GQL. On Jul 3, 10:28 pm, looking wrote: > SELECT * FROM Postings WHERE ID = 1 > there is no result. > > SELECT * FROM Postings WHERE ID > 1 > there is no result. > > SELECT * FROM Postings WHERE ID < 1 > there is no result. > > what is wrong? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[google-appengine] Re: GQL problem
yes, it is what I want. thank you. On Jul 4, 1:04 am, "Nick Johnson (Google)" wrote: > Hi Looking, > > The __key__ property must be a Key object, not an integer. You > probably want "SELECT * FROM Postings WHERE __key__ > KEY('Postings', > 1)". > > -Nick Johnson > > On Fri, Jul 3, 2009 at 3:24 PM, looking wrote: > > > SELECT * FROM Postings WHERE __key__ > 1 > > > why is this GQL wrong? > > it reports "A server error has occurred.". > > -- > Nick Johnson, App Engine Developer Programs Engineer > Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration > Number: 368047 --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[google-appengine] Resizing Image with Stretching
I'm using the Image class to work with an image. When I call image.resize(width = new_width, height = new_height), it seems to honor either height or width, but not both. That is, the method maintains the original aspect ratio without stretching. Is there a way to stretch an image? Thanks. -- http://giscoder.blogspot.com/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[google-appengine] Need help with Email, getting an odd error
message.send() File "/base/python_lib/versions/1/google/appengine/api/mail.py", line 513, in send raise e ApplicationError: ApplicationError: 1 I'm sending out several hundred emails to people that have signed up to announcements, but after 70 or so go I get this error. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[google-appengine] Re: Can't get Django 1.0 to work with App Engine Helper
Try App Engine Patch http://code.google.com/p/app-engine-patch/ It's more complete and active, it worked finer and easier for me. On Jul 3, 3:56 pm, elsigh wrote: > Are you using a zip of the django you want to use and placing it in > your top-level dir naming it django.zip? That should work. > > On Jul 3, 7:33 am, sammcd wrote: > > > Steps to recreate: > > - Download 1.2.3 SDK > > - Download the trunk of Django App Engine Helper > > - Follow Django Helper Instructions including deleting your system > > version of django and replacing it with 1.0. > > > When I import django in the python prompt I am no using 1.0 Final. > > However when I run the latest Django App Engine helper, which is > > supposed to grab your system's version, and use the built-in 1.0 when > > it can. I get this error: > > > : > > django 1.0 was requested, but 1.1.0.alpha.0 is already in use > > > Any help would be much appreciated. From what I can tell 1.1.0alpha.0 > > is nowhere on my system. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[google-appengine] Re: ListProperty substring matching and filtering
Cerea, This may help - I was doing something similiar and noticed different behaviour between the dev server and live server. Specifically, the dev server seemed to funciton as documented (however not as you desire) and return everything that has a record either < or >, however live seemed to operate more like the big table specs in that it does an index scan from the lower bound up to the upper bound (therefor only including items starting with "book" which should give you what you want). So if you're only experiencing your issue on the dev server, it may well work on live. If you're experiencing it on live however I dont think i can help Good luck. On Jul 4, 9:10 am, Bill wrote: > You could use your approach if each keyword were in a separate child > entity where the parent is BlogPage. The child entity would be like > the Relation index described by Slatkin in his Google I/O talk, but in > your case, you'd have a single StringProperty instead of a > StringListProperty so you could do a prefix matching. > > class BlogKeyword: > # Parent is some BlogPage > keyword = StringProperty() > > Your proposed query would be modified to return keys then the parents: > > query = BlogKeyword.all(keys_only=True) \ > .filter('keyword >= ', searchWord) \ > .filter('keyword < ', searchWord + u"\ufffd") \ > .order('keyword') > ordered_post_keys = [key.parent() for key in query.fetch(100)] > > I don't think the way you've appended the counts to the keywords will > work, because ordering will be via string comparison and '3' will > evaluate as larger than '20'. So you should pad the counts based on > max # of digits for your counts, e.g., book_00020 not book_20. > > Having a separate entity per keyword seems wasteful, so I'll think > about it more. > -Bill > > On Jul 4, 12:50 am, Bill wrote: > > > I think the answer is in the documentation for > > ListProperty:http://code.google.com/appengine/docs/python/datastore/typesandproper... > > > In particular: "list_property < value tests if any of the members of > > the list are less than the given value,..." > > > So your inequality filters will succeed for that entity because one > > member of the list will be >= searchWord and another member of the > > list will be < searchWord. > > > As to your question on doing both substring matching + ordering, I'll > > think about it and post if I come up with something. > > -Bill > > > On Jul 3, 12:43 pm, cerea wrote: > > > > Hi, > > > > I'm new to app engine & coding in general, so any help or advice would > > > be greatly appreciated. > > > > Background: > > > I am making a blog and each page has a list of keywords stored in a > > > db.StringListProperty. Those keywords will be used when someone > > > searches the site. I also want each keyword to have an integer > > > associated with it which hold the number of occurrences of that > > > keyword in the page. > > > > My Attempt: > > > I have code which populates a StringListProperty named 'keywords' when > > > a page is created. It looks like this: ["books_20", "lotto_100", > > > "wallet_2"], where "books" is the keyword and "20" is the number of > > > occurrences. My goal was to be able to perform a query to filter out > > > all pages that starts with a certain keyword, then order it by the > > > number of occurrences. Here is an example of my query: > > > > query = BlogPage.all() > > > # my attempt at substring matching > > > # based on the tip > > > here:http://code.google.com/appengine/docs/python/datastore/queriesandinde... > > > query = query.filter('keywords >= ', searchWord) > > > query = query.filter('keywords < ', searchWord + u"\ufffd") > > > query.order('keywords') > > > > Problem: > > > The query doesn't work correctly. If I search for the word "cat" even > > > though it's not in the list, the blog page containing ["books_20", > > > "lotto_100", "wallet_2"] still gets returned. I'm sure there is a > > > logic behind the query and what is returned, but I don't understand. > > > > Questions: > > > Is there a way to perform substring matching on a StringListProperty > > > and also have it ordered? And Is there a better approach to what I'm > > > trying to accomplish? > > > > Thanks so much for taking the time to read my post. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[google-appengine] Debugging in Eclipse with Java SDK
Hi, I am not able to debug in Eclipse version 3.4.2 with the GWT and GAE installed: C:\Eclipse Ganymede\eclipse\\plugins \org.eclipse.platform_3.3.101.v200902111700\splash.bmp -launcher C:\Eclipse Ganymede\eclipse\eclipse.exe com.google.appengine.eclipse.core (1.0.1.v200905131143) "Google App Engine Plug-in" [Active] com.google.appengine.eclipse.sdkbundle (1.2.1.v200905131143) "App Engine SDK" [Starting] com.google.gdt.eclipse.core (1.0.1.v200905131143) "Google Eclipse Core Plug-in" [Active] com.google.gdt.eclipse.suite (1.0.1.v200905131143) "Eclipse Plug- in" [Active] com.google.gwt.eclipse.core (1.0.1.v200905131143) "GWT Plug- in" [Active] com.google.gwt.eclipse.sdkbundle.win32 (1.6.4.v200904062334) "GWT SDK for Win32" [Starting] Does anyone know if I have missed some configuration somewhere? Thanks. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[google-appengine] Re: ListProperty substring matching and filtering
You could use your approach if each keyword were in a separate child entity where the parent is BlogPage. The child entity would be like the Relation index described by Slatkin in his Google I/O talk, but in your case, you'd have a single StringProperty instead of a StringListProperty so you could do a prefix matching. class BlogKeyword: # Parent is some BlogPage keyword = StringProperty() Your proposed query would be modified to return keys then the parents: query = BlogKeyword.all(keys_only=True) \ .filter('keyword >= ', searchWord) \ .filter('keyword < ', searchWord + u"\ufffd") \ .order('keyword') ordered_post_keys = [key.parent() for key in query.fetch(100)] I don't think the way you've appended the counts to the keywords will work, because ordering will be via string comparison and '3' will evaluate as larger than '20'. So you should pad the counts based on max # of digits for your counts, e.g., book_00020 not book_20. Having a separate entity per keyword seems wasteful, so I'll think about it more. -Bill On Jul 4, 12:50 am, Bill wrote: > I think the answer is in the documentation for > ListProperty:http://code.google.com/appengine/docs/python/datastore/typesandproper... > > In particular: "list_property < value tests if any of the members of > the list are less than the given value,..." > > So your inequality filters will succeed for that entity because one > member of the list will be >= searchWord and another member of the > list will be < searchWord. > > As to your question on doing both substring matching + ordering, I'll > think about it and post if I come up with something. > -Bill > > On Jul 3, 12:43 pm, cerea wrote: > > > > > Hi, > > > I'm new to app engine & coding in general, so any help or advice would > > be greatly appreciated. > > > Background: > > I am making a blog and each page has a list of keywords stored in a > > db.StringListProperty. Those keywords will be used when someone > > searches the site. I also want each keyword to have an integer > > associated with it which hold the number of occurrences of that > > keyword in the page. > > > My Attempt: > > I have code which populates a StringListProperty named 'keywords' when > > a page is created. It looks like this: ["books_20", "lotto_100", > > "wallet_2"], where "books" is the keyword and "20" is the number of > > occurrences. My goal was to be able to perform a query to filter out > > all pages that starts with a certain keyword, then order it by the > > number of occurrences. Here is an example of my query: > > > query = BlogPage.all() > > # my attempt at substring matching > > # based on the tip > > here:http://code.google.com/appengine/docs/python/datastore/queriesandinde... > > query = query.filter('keywords >= ', searchWord) > > query = query.filter('keywords < ', searchWord + u"\ufffd") > > query.order('keywords') > > > Problem: > > The query doesn't work correctly. If I search for the word "cat" even > > though it's not in the list, the blog page containing ["books_20", > > "lotto_100", "wallet_2"] still gets returned. I'm sure there is a > > logic behind the query and what is returned, but I don't understand. > > > Questions: > > Is there a way to perform substring matching on a StringListProperty > > and also have it ordered? And Is there a better approach to what I'm > > trying to accomplish? > > > Thanks so much for taking the time to read my post. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[google-appengine] Re: ListProperty substring matching and filtering
I think the answer is in the documentation for ListProperty: http://code.google.com/appengine/docs/python/datastore/typesandpropertyclasses.html#ListProperty In particular: "list_property < value tests if any of the members of the list are less than the given value,..." So your inequality filters will succeed for that entity because one member of the list will be >= searchWord and another member of the list will be < searchWord. As to your question on doing both substring matching + ordering, I'll think about it and post if I come up with something. -Bill On Jul 3, 12:43 pm, cerea wrote: > Hi, > > I'm new to app engine & coding in general, so any help or advice would > be greatly appreciated. > > Background: > I am making a blog and each page has a list of keywords stored in a > db.StringListProperty. Those keywords will be used when someone > searches the site. I also want each keyword to have an integer > associated with it which hold the number of occurrences of that > keyword in the page. > > My Attempt: > I have code which populates a StringListProperty named 'keywords' when > a page is created. It looks like this: ["books_20", "lotto_100", > "wallet_2"], where "books" is the keyword and "20" is the number of > occurrences. My goal was to be able to perform a query to filter out > all pages that starts with a certain keyword, then order it by the > number of occurrences. Here is an example of my query: > > query = BlogPage.all() > # my attempt at substring matching > # based on the tip > here:http://code.google.com/appengine/docs/python/datastore/queriesandinde... > query = query.filter('keywords >= ', searchWord) > query = query.filter('keywords < ', searchWord + u"\ufffd") > query.order('keywords') > > Problem: > The query doesn't work correctly. If I search for the word "cat" even > though it's not in the list, the blog page containing ["books_20", > "lotto_100", "wallet_2"] still gets returned. I'm sure there is a > logic behind the query and what is returned, but I don't understand. > > Questions: > Is there a way to perform substring matching on a StringListProperty > and also have it ordered? And Is there a better approach to what I'm > trying to accomplish? > > Thanks so much for taking the time to read my post. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---