Alternative to IN (Filter)

37 views
Skip to first unread message

Skm Villa

unread,
May 8, 2020, 4:28:40 PM5/8/20
to Google App Engine
Hi Team,

My code : 

List<String> cells;
return ofy().load().type(User.class).filter("geocells in", cells).limit(50).list();

Error 
[e~taxidealsnl/standard-project:dev.426523627618302404].<stdout>: 2020-05-08 11:48:52.783  INFO 1 --- [Request0C1E463F] c.l.m.c.ExceptionHandlerController       : Error ==The Cloud Datastore SDK does not currently support 'IN' filters

Could you pls alterrnative solution for above code.

it is complicated 

I have 100K records, i cant scan whole DB for it...........

Thx.

hr lumiins

unread,
May 10, 2020, 4:52:33 AM5/10/20
to Google App Engine
Hi Team,

Can i can support from google cloud team  or someone who can solve this issue. ?

Joshua Smith

unread,
May 10, 2020, 8:26:10 AM5/10/20
to google-a...@googlegroups.com
Do a whole lot of queries in tasks and collect the results together. That’s all an IN filter on a nosql dB would do behind the scenes anyway. If that doesn’t work for you get more clever in your schema to include something you can filter on to get you a superset. 

On May 10, 2020, at 4:52 AM, hr lumiins <hr.lu...@gmail.com> wrote:


--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/233518b1-6957-424d-87d7-ee8ce51b2d1d%40googlegroups.com.

George (Cloud Platform Support)

unread,
May 11, 2020, 10:51:05 AM5/11/20
to Google App Engine
You are right, Datastore allows querying on properties. Supported comparison operators are =, <, >, <=, and >=. "Not equal" and IN operators are currently not supported. This may change in future. You may check related detail on the Query page, among others. 
Reply all
Reply to author
Forward
0 new messages