You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like it is not possible to have Embedded object as a single item and bundle forces to use always array.
Is it right or I am missing something?
The raw object looks like
{
"bar": {
"acme": "delta"
}
}
php class mapping
/*** @ES\Index()*/class A {
/** * @ES\Embedded(class="Bar") */public$bar;
}
/*** @ES\ObjectType()*/class Bar {
/** * @ES\Property(type="keyword") */public$acme;
}
As result, \ONGR\ElasticsearchBundle\Result\ObjectIterator::doInitialize iterates object keys and passes primitive to convertDocument that expect array as well as other methods that will be called afterwards.
At the same time \ONGR\ElasticsearchBundle\Mapping\Converter::normalize has verification if embeded value is iterable.
Did I miss something? How to deal with it, when I have already defined schema and it returns single object instead of array, change type is not an option.
Thanks in advance.
The text was updated successfully, but these errors were encountered:
Looks like it is not possible to have Embedded object as a single item and bundle forces to use always array.
Is it right or I am missing something?
The raw object looks like
php class mapping
As result,
\ONGR\ElasticsearchBundle\Result\ObjectIterator::doInitialize
iterates object keys and passes primitive toconvertDocument
that expect array as well as other methods that will be called afterwards.At the same time
\ONGR\ElasticsearchBundle\Mapping\Converter::normalize
has verification ifembeded
value is iterable.Did I miss something? How to deal with it, when I have already defined schema and it returns single object instead of array, change type is not an option.
Thanks in advance.
The text was updated successfully, but these errors were encountered: