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
-~----------~----~----~----~------~----~------~--~---

Reply via email to