Wednesday, December 17, 2008

Google App Engine's real indexing limit

5000, that the number you are looking for. I tried to fill up a db.ListProperty(int) as much as I could. The SDK stopped working and started complaining about me having too much to be indexed at this point, 5000. So if you have more than 5000 entities to index in a ListProperty, get around. I came up with a solution where you use a db.ListProperty(db.Key) to hold the keys of the actual ListProperty(s) you use to store stuff. And then make some special interface for it so that it loop through its parts automatically. Implementing such kind of interface, including a reading method, a saving method and a deleting method took up about 70 lines of code, empty lines included. And then I have no limits on GAE's indexing any more!

1 comment:

dobee said...

if you have a list property that has 5000 entries in real world, not the index is the problem. it's the application's design imho