# Two (probably) documents within the same content-structrure couln't be indexed

**URL:** <https://discuss.elastic.co/t/two-probably-documents-within-the-same-content-structrure-coulnt-be-indexed/11729>\
**Category:** Elasticsearch\
**Created:** [April 29, 2013, 12:12pm UTC](https://discuss.elastic.co/t/two-probably-documents-within-the-same-content-structrure-coulnt-be-indexed/11729 "2013-04-29T12:12:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sentient6\_2](https://avatars.discourse-cdn.com/v4/letter/s/58f4c7/32.png) [@Sentient6\_2](https://discuss.elastic.co/u/Sentient6_2)\
**Post date:** [April 29, 2013, 12:12pm UTC](https://discuss.elastic.co/t/two-probably-documents-within-the-same-content-structrure-coulnt-be-indexed/11729/1 "2013-04-29T12:12:42Z")

</div>

Hallo dear all,

the last days I played a lot with Elastic Search and I'm really impressed.  
But now I have a problem which seems a little bit strange.

I tried to index a document looking like this:

{"metadataContainerType":  
{"xmlns:ns3":"\*\*\*",  
"title":"Eine Szene",  
"id":{},  
"format":"text/xml",  
"created":"2011-12-16T20:32:56.580+01:00",  
"lastModified":"2012-05-10T07:30:14.766+02:00",  
"issued":"2011-12-16T20:32:56.580+01:00",  
"revision":0,  
"pid":"hdl:11858/00-1734-0000-0001-D89D-E",  
"extent":38,  
"availability":"public",  
"permissions":"read",  
"rightsHolder":{},  
"dateOfCreation":{},  
"genre":"prose"}}

and everything works fine!

But when I try index this file:

{"metadataContainerType":  
{"xmlns:ns3":"\*\*\*",  
"title":"Des Dichters Freundin",  
"id":{},  
"format":"text/xml",  
"created":"2011-12-16T20:35:44.239+01:00",  
"lastModified":"2011-12-16T20:35:44.239+01:00",  
"issued":"2011-12-16T20:35:44.239+01:00",  
"revision":0,  
"pid":"hdl:11858/00-1734-0000-0001-D978-7",  
"extent":10767,  
"availability":"public",  
"permissions":{},  
"dateOfCreation":{},  
"agent":{},  
"genre":{}}}

I get the error: "{"error":"MapperParsingException[object mapping for  
[metadata] tried to parse as object, but got EOF, has a concrete value been  
provided to it?]","status":400}"

When I remove the "metadataContainerType": it works!

So I am a little bit confused, can someone of you explain me this behavior?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Kenneth\_Loafman\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kenneth_loafman_2/32/2224_2.png) [@Kenneth\_Loafman\_2](https://discuss.elastic.co/u/Kenneth_Loafman_2)\
**Post date:** [April 29, 2013, 12:56pm UTC](https://discuss.elastic.co/t/two-probably-documents-within-the-same-content-structrure-coulnt-be-indexed/11729/2 "2013-04-29T12:56:12Z")

</div>

JSON must have balanced braces. Add a closing brace and check your nesting.

...Ken

On Mon, Apr 29, 2013 at 7:12 AM, Sentient6 [maxi\_brodhun@hotmail.com](mailto:maxi_brodhun@hotmail.com) wrote:

> Hallo dear all,
> 
> the last days I played a lot with Elastic Search and I'm really impressed.  
> But now I have a problem which seems a little bit strange.
> 
> I tried to index a document looking like this:
> 
> {"metadataContainerType":  
> {"xmlns:ns3":"\*\*\*",  
> "title":"Eine Szene",  
> "id":{},  
> "format":"text/xml",  
> "created":"2011-12-16T20:32:56.580+01:00",  
> "lastModified":"2012-05-10T07:30:14.766+02:00",  
> "issued":"2011-12-16T20:32:56.580+01:00",  
> "revision":0,  
> "pid":"hdl:11858/00-1734-0000-0001-D89D-E",  
> "extent":38,  
> "availability":"public",  
> "permissions":"read",  
> "rightsHolder":{},  
> "dateOfCreation":{},  
> "genre":"prose"}}
> 
> and everything works fine!
> 
> But when I try index this file:
> 
> {"metadataContainerType":  
> {"xmlns:ns3":"\*\*\*",  
> "title":"Des Dichters Freundin",  
> "id":{},  
> "format":"text/xml",  
> "created":"2011-12-16T20:35:44.239+01:00",  
> "lastModified":"2011-12-16T20:35:44.239+01:00",  
> "issued":"2011-12-16T20:35:44.239+01:00",  
> "revision":0,  
> "pid":"hdl:11858/00-1734-0000-0001-D978-7",  
> "extent":10767,  
> "availability":"public",  
> "permissions":{},  
> "dateOfCreation":{},  
> "agent":{},  
> "genre":{}}}
> 
> I get the error: "{"error":"MapperParsingException[object mapping for  
> [metadata] tried to parse as object, but got EOF, has a concrete value been  
> provided to it?]","status":400}"
> 
> When I remove the "metadataContainerType": it works!
> 
> So I am a little bit confused, can someone of you explain me this behavior?
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Sentient6](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@Sentient6](https://discuss.elastic.co/u/Sentient6)\
**Post date:** [April 29, 2013, 1:23pm UTC](https://discuss.elastic.co/t/two-probably-documents-within-the-same-content-structrure-coulnt-be-indexed/11729/3 "2013-04-29T13:23:14Z")

</div>

But I think the braces are balanced. Maybe I overlook something.

The frist one.

{"metadataContainerType" :  
{

```
        ......

  "genre" : "prose"

}

```

}

The second one:

{"metadataContainerType":  
{  
.......

```
 "genre" : {}

```

}  
}

---

<div class="post-metadata">

**Author:** ![Sentient6](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@Sentient6](https://discuss.elastic.co/u/Sentient6)\
**Post date:** [April 30, 2013, 8:26am UTC](https://discuss.elastic.co/t/two-probably-documents-within-the-same-content-structrure-coulnt-be-indexed/11729/4 "2013-04-30T08:26:56Z")

</div>

Hello to all again.

I figured out that the problem occurs when I add something in the "rightsholder" field.

"rightsholder" : {}, is ok! But

"rightsholder" : "me", is not ok.

Can somebody explain me this behaviour?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:39am UTC](https://discuss.elastic.co/t/two-probably-documents-within-the-same-content-structrure-coulnt-be-indexed/11729/5 "2017-07-06T02:39:07Z")

</div>


