# Inconsistent document existence between search and get?

**URL:** https://discuss.elastic.co/t/inconsistent-document-existence-between-search-and-get/14437
**Category:** Elasticsearch
**Created:** [November 17, 2013, 7:58am UTC](https://discuss.elastic.co/t/inconsistent-document-existence-between-search-and-get/14437 "2013-11-17T07:58:41Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![kakaner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kakaner/32/1892_2.png) [@kakaner](https://discuss.elastic.co/u/kakaner)
#### Post date: [November 17, 2013, 7:58am UTC](https://discuss.elastic.co/t/inconsistent-document-existence-between-search-and-get/14437/1 "2013-11-17T07:58:41Z")

</div>

I have a document that shows up when using the search api but not get.

The document is in index A, with type B, and id N.

The following endpoints yield:  
host:9200/\_search =\> finds document  
host:9200/A/\_search =\> finds document  
host:9200/A/B/\_search =\> finds document  
host:9200/A/B/N =\> document doesn't exist (returns false)

However, documents with other ID's do exist when I use the get route. I've  
been able to replicate this behavior only with several documents in my set.  
I have only performed indexing commands, no deletes or updates. The  
document is not wellformed when returned in search.

Are any of you aware of a case that could cause this type of behavior? Just  
for clarity I've pasted some relevant JSON outputs into the following gist:

> <https://gist.github.com/kakaner/7510332>

Thanks in advance!!

--  
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: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [November 17, 2013, 9:06am UTC](https://discuss.elastic.co/t/inconsistent-document-existence-between-search-and-get/14437/2 "2013-11-17T09:06:30Z")

</div>

Did you use route or parent/child when indexing?

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 17 nov. 2013 à 08:58, kakaner [kakaner@gmail.com](mailto:kakaner@gmail.com) a écrit :

> I have a document that shows up when using the search api but not get.
> 
> The document is in index A, with type B, and id N.
> 
> The following endpoints yield:  
> host:9200/\_search =\> finds document  
> host:9200/A/\_search =\> finds document  
> host:9200/A/B/\_search =\> finds document  
> host:9200/A/B/N =\> document doesn't exist (returns false)
> 
> However, documents with other ID's do exist when I use the get route. I've been able to replicate this behavior only with several documents in my set. I have only performed indexing commands, no deletes or updates. The document is not wellformed when returned in search.
> 
> Are any of you aware of a case that could cause this type of behavior? Just for clarity I've pasted some relevant JSON outputs into the following gist:  
> [Elasticsearch document existence inconsistencies example · GitHub](https://gist.github.com/kakaner/7510332)
> 
> ## Thanks in advance!!
> 
> 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: ![kakaner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kakaner/32/1892_2.png) [@kakaner](https://discuss.elastic.co/u/kakaner)
#### Post date: [November 18, 2013, 1:50am UTC](https://discuss.elastic.co/t/inconsistent-document-existence-between-search-and-get/14437/3 "2013-11-18T01:50:02Z")

</div>

Ah! I used routing. Dumb problem solved-- thanks!

On Sunday, November 17, 2013 4:06:30 AM UTC-5, David Pilato wrote:

> Did you use route or parent/child when indexing?
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 17 nov. 2013 à 08:58, kakaner \<[kak...@gmail.com](mailto:kak...@gmail.com) \<javascript:\>\> a  
> écrit :
> 
> I have a document that shows up when using the search api but not get.
> 
> The document is in index A, with type B, and id N.
> 
> The following endpoints yield:  
> host:9200/\_search =\> finds document  
> host:9200/A/\_search =\> finds document  
> host:9200/A/B/\_search =\> finds document  
> host:9200/A/B/N =\> document doesn't exist (returns false)
> 
> However, documents with other ID's do exist when I use the get route. I've  
> been able to replicate this behavior only with several documents in my set.  
> I have only performed indexing commands, no deletes or updates. The  
> document is not wellformed when returned in search.
> 
> Are any of you aware of a case that could cause this type of behavior?  
> Just for clarity I've pasted some relevant JSON outputs into the following  
> gist:  
> [Elasticsearch document existence inconsistencies example · GitHub](https://gist.github.com/kakaner/7510332)
> 
> Thanks in advance!!
> 
> --  
> 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> 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: ![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:06am UTC](https://discuss.elastic.co/t/inconsistent-document-existence-between-search-and-get/14437/4 "2017-07-06T02:06:32Z")

</div>


