Storage defaults to string when property is a class
(using 0.6.0)
When a property is set as an array of a class object the storage will default to use string. This will throw a parsing exception from elasticsearch when an object is being indexed. Explicitly setting :type => 'object' will fix the issue.
For example:
property :myproperty, :class => [My::Class], :default => [], type: 'object'
will work. However omitting the type will fail later during indexing because elasticsearch expects an array of strings.
@kelaban so this property should be an array of a custom type?
Yes thats correct
When digging around this issue, I have actually found much more profound problems with casted collections: they seem to be not indexed properly, etc. Will try to find some time to resolve these and add integration tests for the set of features.