[google-appengine] Re: Using __key__ and SearchableModel
On 12 Jun., 01:09, acuth adrian.cuthb...@gmail.com wrote: Hi everyone, just caught up with one of those Google IO videos about developing apps on GAE. I was already using separated out index-blocks so that I could restrict what was indexed for SearchableModel. Now I just want to return the keys rather than the object themselves. Does anybody know if it is possible to return just the keys - as per SELECT __KEY__ or Query(keys_only=True) - on queries/searches using the SearchableModel class, for example: from google.appengine.ext importsearch class ItemIB(search.SearchableModel): name = db.StringProperty() #searchfor items with name that matches q, but returns entire ItemIB query = ItemIB.all().search(q) # try replacing Model.all() with db.Query(Model) doesn't work query = db.Query(ItemIB,keys_only=True).search(q) Any help very gratefully received, Adrian Hi, you can use gae-search for this. Visit http://gae-full-text-search.appspot.com/ and take a look at the documentation/demos. I hope you will like it. Best regards Thomas --~--~-~--~~~---~--~~ 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 __key__ and SearchableModel
With the SearchableModel class you get a new method called search() that takes as a parameter the terms you are searching on. AFAIK there isn't a GQL construct that matches it. On Jun 12, 3:48 am, Antoniov nio@gmail.com wrote: SELECT [* | __key__ ] FROM entity [WHERE condition [AND condition ...]] [ORDER BY property [ASC | DESC] [, property [ASC | DESC] ...]] [LIMIT [offset,]count] [OFFSET offset] [HINT (ORDER_FIRST | HINT FILTER_FIRST | HINT ANCESTOR_FIRST)] Is this what you're looking for? On 6月12日, 上午7时09分, acuth adrian.cuthb...@gmail.com wrote: Hi everyone, just caught up with one of those Google IO videos about developing apps on GAE. I was already using separated out index-blocks so that I could restrict what was indexed for SearchableModel. Now I just want to return the keys rather than the object themselves. Does anybody know if it is possible to return just the keys - as per SELECT __KEY__ or Query(keys_only=True) - on queries/searches using the SearchableModel class, for example: from google.appengine.ext import search class ItemIB(search.SearchableModel): name = db.StringProperty() # search for items with name that matches q, but returns entire ItemIB query = ItemIB.all().search(q) # try replacing Model.all() with db.Query(Model) doesn't work query = db.Query(ItemIB,keys_only=True).search(q) Any help very gratefully received, Adrian --~--~-~--~~~---~--~~ 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 __key__ and SearchableModel
SELECT [* | __key__ ] FROM entity [WHERE condition [AND condition ...]] [ORDER BY property [ASC | DESC] [, property [ASC | DESC] ...]] [LIMIT [offset,]count] [OFFSET offset] [HINT (ORDER_FIRST | HINT FILTER_FIRST | HINT ANCESTOR_FIRST)] Is this what you're looking for? On 6月12日, 上午7时09分, acuth adrian.cuthb...@gmail.com wrote: Hi everyone, just caught up with one of those Google IO videos about developing apps on GAE. I was already using separated out index-blocks so that I could restrict what was indexed for SearchableModel. Now I just want to return the keys rather than the object themselves. Does anybody know if it is possible to return just the keys - as per SELECT __KEY__ or Query(keys_only=True) - on queries/searches using the SearchableModel class, for example: from google.appengine.ext import search class ItemIB(search.SearchableModel): name = db.StringProperty() # search for items with name that matches q, but returns entire ItemIB query = ItemIB.all().search(q) # try replacing Model.all() with db.Query(Model) doesn't work query = db.Query(ItemIB,keys_only=True).search(q) Any help very gratefully received, Adrian --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---