Storing a byte array

I get an exception when trying to store (index) a document that has a field that contains a byte array:

Are such fields allowed?
Is any special index configuration necessary? (other than "not_analyzed"
Any docs?

File "sub/data/tools/python/lib/python2.7/site-packages/elasticsearch/serializer.py", line 50, in dumps
raise SerializationError(data, e)
SerializationError: '...', 69, 70, 'ordinal not in range(128)'))

Answer:
type: "binary"
And the value must be Base64 encoded (not an arbitrary byte array)