I am also wondering this. Apparently there is a hack to match a
prefix, but not a general solution:

http://code.google.com/appengine/docs/python/datastore/queriesandindexes.html
"""
Query filters do not have an explicit way to match just part of a
string value, but you can fake a prefix match using inequality
filters:

db.GqlQuery("SELECT * FROM MyModel WHERE prop >= :1 AND prop < :2",
"abc", u"abc" + u"\ufffd")

This matches every MyModel entity with a string property prop that
begins with the characters abc. The unicode string u"\ufffd"
represents the largest possible Unicode character. When the property
values are sorted in an index, the values that fall in this range are
all of the values that begin with the given prefix.
"""

How does the DAL support LIKE on GAE?

Richard


On Oct 26, 10:11 pm, mattynoce <mattyn...@gmail.com> wrote:
> hi, i have a question regarding google app engine.
>
> i'm trying to institute a search feature, where people can type into a
> box and get a result. i understand that gae doesn't allow use of
> "like" because it results in a full table scan and their datastore is
> built to not allow for anything that would do that.
>
> can you think of any way in gae to do a search? otherwise i can try
> pulling all the data (though you can only get 1000 records at a time)
> and filtering it in python. but i wanted to see if anyone had other
> solutions they had used to get around this.
>
> thanks,
>
> matt
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to