Reputation: 35346
When storing String
fields with App Engine:
length()
of the String
that App Engine
datastore can handle?Upvotes: 12
Views: 4621
Reputation: 35
Based on updates to Google Datastore documentation from October, 2016, here are the limits
Maximum size of an indexed string property's UTF-8 encoding: 1,500 bytes
Maximum size for an unindexed property: 1,048,487 bytes (1 MiB - 89 bytes)
So you can store strings close to 1MB in size in an unindexed String
property.
Upvotes: 1
Reputation: 625
I think the responses to this one are out of date, so I am updating. I'm using GAE version 1.9.22 and received this in the error logs:
String properties must be 1500 bytes or less. Instead, use com.google.appengine.api.datastore.Text, which can store strings of any length.
Using com.google.appengine.api.datastore.Text works well by converting the String object to Text (e.g., new Text(thisString) on the server side of your code. Any reference to libraries in com.google.appengine.api.datastore.* do not work on the client side. Class not found.
Upvotes: 5
Reputation: 13556
Objectify will automatically convert Strings of more than 500 characters to native Text storage. Be careful if you are indexing strings; Text objects are not indexed so the String > 500 chars will be unindexed.
Upvotes: 9
Reputation: 34685
Per the documentation, 500 characters. And no, Objectify is a wrapper and does not modify your data, so the data size limitations are unchanged.
Upvotes: 4