Massimiliano, the point is that there's no way to create an index that
can be used to avoid a full-scan into the database in that kind of
query, so, even if you can do "ILIKE '%anything%'" in PgSQL or "LIKE
'%anotherthing%'" in MySQL, it will result in a full-scan on every
record at database.

But, if you have a small set of record in you database, you can do
something like this: http://dpaste.com/hold/202782/ . You can do this
in larger sets of databases also, but you may deal with some
DeadLineErrors at your application.

Note: This solution has absolutely no performance at all, you can even
do some kind of pagination (scanning the database only up to N
registers and breaking after that) but if the scan happens to iterate
over thousands of records before reach N records found, you will still
have DeadLineErrors.

On Thu, Jun 3, 2010 at 11:04 AM, Massimiliano
<massimiliano.pietr...@gmail.com> wrote:
> So there isn't a scalable solution!
>
> 2010/6/3 Geoffrey Spear <geoffsp...@gmail.com>
>>
>>
>> On Jun 3, 4:58 am, Massimiliano <massimiliano.pietr...@gmail.com>
>> wrote:
>> > I need just something like *myvar* so I will accept any carachters
>> > before
>> > and after the var...
>> > Or I have to divide the strings in list (each word an elment of the
>> > list)
>> > and use the operator IN.
>> > Thinking
>>
>> Building a keyword index for each entity is fairly trivial.
>>
>> Indexing so that you can find "oob" in "foobar" isn't, and I don't
>> believe there's a scalable solution for this.  An RDBMS will do
>> searches like this for you, but it won't scale well.  I believe it's
>> only possible by doing a table scan, which App Engine won't let you do
>> (short of manually fetching every entity and checking if it contains
>> your substring, which obviously isn't going to be pretty.)
>>
>> --
>> 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.
>>
>
>
>
> --
>
> My email: massimiliano.pietr...@gmail.com
> My Google Wave: massimiliano.pietr...@googlewave.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-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.
>

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

Reply via email to