# Missing uid for nested documents

**URL:** <https://discuss.elastic.co/t/missing-uid-for-nested-documents/13042>\
**Category:** Elasticsearch\
**Created:** [August 2, 2013, 2:07pm UTC](https://discuss.elastic.co/t/missing-uid-for-nested-documents/13042 "2013-08-02T14:07:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidpilny](https://avatars.discourse-cdn.com/v4/letter/d/f07891/32.png) [@davidpilny](https://discuss.elastic.co/u/davidpilny)\
**Post date:** [August 2, 2013, 2:07pm UTC](https://discuss.elastic.co/t/missing-uid-for-nested-documents/13042/1 "2013-08-02T14:07:30Z")

</div>

Hello,

I tried to use the most simple nested mapping according to the documentation  
[http://www.elasticsearch.org/guide/reference/mapping/nested-type/](http://www.elasticsearch.org/guide/reference/mapping/nested-type/)

but when I insert some data and try to scroll over them or try to open the index on localhost:9200 i get this error

FetchPhaseExecutionException[[posts\_1000][1]: query[ConstantScore(NotDeleted(cache(PrefixFilter(\_uid:default#))))],from[0],size[3000]: Fetch Failed [Failed to load uid from the index, missing internal \_uid field, current fields in the doc [[]]]]

Has anyone come across this problem?

---

<div class="post-metadata">

**Author:** ![davidpilny](https://avatars.discourse-cdn.com/v4/letter/d/f07891/32.png) [@davidpilny](https://discuss.elastic.co/u/davidpilny)\
**Post date:** [August 2, 2013, 4:38pm UTC](https://discuss.elastic.co/t/missing-uid-for-nested-documents/13042/2 "2013-08-02T16:38:16Z")

</div>

It was caused by turned-off type field index

[http://www.elasticsearch.org/guide/reference/mapping/type-field/](http://www.elasticsearch.org/guide/reference/mapping/type-field/)

We didn't need the type search so we had the index disabled. I do not know why it is actually bound with scrolling the nested documents, but after enabling the index, everything works as expected.

---

<div class="post-metadata">

**Author:** ![mvg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mvg/32/98890_2.png) [@mvg](https://discuss.elastic.co/u/mvg)\
**Post date:** [August 5, 2013, 3:39pm UTC](https://discuss.elastic.co/t/missing-uid-for-nested-documents/13042/3 "2013-08-05T15:39:16Z")

</div>

Can you share the search request and mapping that caused the error in your  
first email?

On 2 August 2013 18:38, davidpilny [pilny@brandembassy.com](mailto:pilny@brandembassy.com) wrote:

> It was caused by turned-off type field index
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/mapping/type-field/)
> 
> We didn't need the type search so we had the index disabled. I do not know  
> why it is actually bound with scrolling the nested documents, but after  
> enabling the index, everything works as expected.
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/Missing-uid-for-nested-documents-tp4039035p4039042.html](http://elasticsearch-users.115913.n3.nabble.com/Missing-uid-for-nested-documents-tp4039035p4039042.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> 
> --  
> 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).

--  
Met vriendelijke groet,

Martijn van Groningen

--  
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:** ![davidpilny](https://avatars.discourse-cdn.com/v4/letter/d/f07891/32.png) [@davidpilny](https://discuss.elastic.co/u/davidpilny)\
**Post date:** [August 6, 2013, 11:06am UTC](https://discuss.elastic.co/t/missing-uid-for-nested-documents/13042/4 "2013-08-06T11:06:54Z")

</div>

Sure, it was the most simple properties mapping that was possible to create.

{  
"default":{  
"\_boost":{  
"name":"\_boost",  
"null\_value":1  
},  
"\_type":{  
"store":"no",  
"index":"no"  
},  
"\_all":{  
"enabled":false  
},  
"properties":{  
"conversations":{  
"type":"nested"  
}  
}  
}  
}

And I just used a web browser search like this

[http://localhost:9200/testindex/default/\_search?size=3000](http://localhost:9200/testindex/default/_search?size=3000)

As soon as it came across some item that had the "conversations" field not empty, it crashed with the exception I mentioned in the first e-mail.

---

<div class="post-metadata">

**Author:** ![mvg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mvg/32/98890_2.png) [@mvg](https://discuss.elastic.co/u/mvg)\
**Post date:** [August 6, 2013, 2:26pm UTC](https://discuss.elastic.co/t/missing-uid-for-nested-documents/13042/5 "2013-08-06T14:26:24Z")

</div>

Which version are you running? This error only seem to exists in version  
0.20 and before.

On 6 August 2013 13:06, davidpilny [pilny@brandembassy.com](mailto:pilny@brandembassy.com) wrote:

> Sure, it was the most simple properties mapping that was possible to  
> create.
> 
> {  
> "default":{  
> "\_boost":{  
> "name":"\_boost",  
> "null\_value":1  
> },  
> "\_type":{  
> "store":"no",  
> "index":"no"  
> },  
> "\_all":{  
> "enabled":false  
> },  
> "properties":{  
> "conversations":{  
> "type":"nested"  
> }  
> }  
> }  
> }
> 
> And I just used a web browser search like this
> 
> [http://localhost:9200/testindex/default/\_search?size=3000](http://localhost:9200/testindex/default/_search?size=3000)
> 
> As soon as it came across some item that had the "conversations" field not  
> empty, it crashed with the exception I mentioned in the first e-mail.
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/Missing-uid-for-nested-documents-tp4039035p4039187.html](http://elasticsearch-users.115913.n3.nabble.com/Missing-uid-for-nested-documents-tp4039035p4039187.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> 
> --  
> 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).

--  
Met vriendelijke groet,

Martijn van Groningen

--  
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:** ![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:22am UTC](https://discuss.elastic.co/t/missing-uid-for-nested-documents/13042/6 "2017-07-06T02:22:40Z")

</div>


