Getting order of Entity based on index and property.

31 views
Skip to first unread message

Oliver Billing

unread,
Aug 17, 2012, 2:38:59 AM8/17/12
to google-a...@googlegroups.com

I have a 100.000 entities  and I want the  position of a single Entity compared to the rest, based upon a single property called "score".  I have the Entity's key.

Is this possible without having to iterate through 100.000 entities, for instance using the generated idx on the "score" property.

alex

unread,
Aug 17, 2012, 4:05:41 AM8/17/12
to google-a...@googlegroups.com
Looks like a perfect task for mapreduce.

Oliver Billing

unread,
Aug 17, 2012, 5:05:10 AM8/17/12
to google-a...@googlegroups.com
Yeah, but it is too slow and would cost too many read operations *sigh*  Besides the score will be updated frquently

alex

unread,
Aug 17, 2012, 6:01:36 AM8/17/12
to google-a...@googlegroups.com
If there's nothing else besides that the score will be updated frequently that you forgot to mention, you could still pre-compute initial position using mapreduce and then do partial updates just on the entities that have the score changed. There are a few known algorithms.
Reply all
Reply to author
Forward
0 new messages