Update api, empty object update results in array

Hi.
I'm facing some wierd problem with update api.
I have a document with object type inside.
for example:
{
"a":"a",
"b": {"c", "c"}
}
Now I want to update b entry with "{}" (clear object)
I would expect result:
{
"a":"a",
"b": {}
}
But I get:
{
"a":"a",
"b": []
}

ES converts object {} into array []
Why?
Is it issues with ES configuration?

I was testing it on 0.19.8 and 0.20.1
For updates I'm using java api

In the case of

{
"a":"a",
"b": {"c", "c"}
}

I don't think that b is an object.

In the following JSon b should be an object.
{
"a":"a",
"b": {"c" :"value1", "d":"value2"}
}

My two cents.
David.

Le 21 décembre 2012 à 13:43, michalj oniron9th@hotmail.com a écrit :

Hi.
I'm facing some wierd problem with update api.
I have a document with object type inside.
for example:
{
"a":"a",
"b": {"c", "c"}
}
Now I want to update b entry with "{}" (clear object)
I would expect result:
{
"a":"a",
"b": {}
}
But I get:
{
"a":"a",
"b":
}

ES converts object {} into array
Why?
Is it issues with ES configuration?

I was testing it on 0.19.8 and 0.20.1
For updates I'm using java api

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/Update-api-empty-object-update-results-in-array-tp4027330.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

--

--
David Pilato
http://www.scrutmydocs.org/
http://dev.david.pilato.fr/
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--

Yeah, right, my bad.
It's shortcut but problem exists.
BR