# IndexMissingException when using MoreLike

**URL:** <https://discuss.elastic.co/t/indexmissingexception-when-using-morelike/9164>\
**Category:** Elasticsearch\
**Created:** [September 26, 2012, 8:21pm UTC](https://discuss.elastic.co/t/indexmissingexception-when-using-morelike/9164 "2012-09-26T20:21:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [September 26, 2012, 8:21pm UTC](https://discuss.elastic.co/t/indexmissingexception-when-using-morelike/9164/1 "2012-09-26T20:21:19Z")

</div>

I have been getting occasional IndexMissingExceptions, but only when using  
MoreLike. The request uses an alias and the exception points to the correct  
index.

Not only do searches work fine, but the MoreLike request that failed  
actually returns a proper response. Perhaps one node is incorrect? Hard to  
debug due to multiple threads. Here is the exception:

org.elasticsearch.indices.IndexMissingException: [products-20120919-114007]  
missing  
at  
org.elasticsearch.indices.InternalIndicesService.indexServiceSafe(InternalIndicesService.java:243)  
at  
org.elasticsearch.action.mlt.TransportMoreLikeThisAction$1.onResponse(TransportMoreLikeThisAction.java:114)  
at  
org.elasticsearch.action.mlt.TransportMoreLikeThisAction$1.onResponse(TransportMoreLikeThisAction.java:105)  
at  
org.elasticsearch.action.support.TransportAction$ThreadedActionListener$1.run(TransportAction.java:86)  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)  
at java.lang.Thread.run(Thread.java:662)

Running ES 0.19.8 via the TransportClient. The index does not have shards  
on every node of the cluster due to the distribution of shards across the  
nodes. Shouldn't be an issue, just an FYI.

Cheers,

Ivan

--

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [September 26, 2012, 8:48pm UTC](https://discuss.elastic.co/t/indexmissingexception-when-using-morelike/9164/2 "2012-09-26T20:48:38Z")

</div>

Quick correction: the failed MoreLike request does not return a valid  
response. My error handling code (inherited!) for exceptions was faulty.

On Wed, Sep 26, 2012 at 1:21 PM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:

> I have been getting occasional IndexMissingExceptions, but only when using  
> MoreLike. The request uses an alias and the exception points to the correct  
> index.
> 
> Not only do searches work fine, but the MoreLike request that failed  
> actually returns a proper response. Perhaps one node is incorrect? Hard to  
> debug due to multiple threads. Here is the exception:
> 
> org.elasticsearch.indices.IndexMissingException:  
> [products-20120919-114007] missing  
> at  
> org.elasticsearch.indices.InternalIndicesService.indexServiceSafe(InternalIndicesService.java:243)  
> at  
> org.elasticsearch.action.mlt.TransportMoreLikeThisAction$1.onResponse(TransportMoreLikeThisAction.java:114)  
> at  
> org.elasticsearch.action.mlt.TransportMoreLikeThisAction$1.onResponse(TransportMoreLikeThisAction.java:105)  
> at  
> org.elasticsearch.action.support.TransportAction$ThreadedActionListener$1.run(TransportAction.java:86)  
> at  
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)  
> at  
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)  
> at java.lang.Thread.run(Thread.java:662)
> 
> Running ES 0.19.8 via the TransportClient. The index does not have shards  
> on every node of the cluster due to the distribution of shards across the  
> nodes. Shouldn't be an issue, just an FYI.
> 
> Cheers,
> 
> Ivan

--

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [September 27, 2012, 12:54am UTC](https://discuss.elastic.co/t/indexmissingexception-when-using-morelike/9164/3 "2012-09-27T00:54:07Z")

</div>

It looks like [IndexMissingException when calling \_mlt on client node · Issue #2197 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/2197)  
only instead of executing request on the node client, it fails when request  
is getting executed on the node where your index doesn't have any shards.

On Wednesday, September 26, 2012 4:48:45 PM UTC-4, Ivan Brusic wrote:

> Quick correction: the failed MoreLike request does not return a valid  
> response. My error handling code (inherited!) for exceptions was faulty.
> 
> On Wed, Sep 26, 2012 at 1:21 PM, Ivan Brusic \<[iv...@brusic.com](mailto:iv...@brusic.com)\<javascript:\>
> 
> > wrote:
> 
> > I have been getting occasional IndexMissingExceptions, but only when  
> > using MoreLike. The request uses an alias and the exception points to the  
> > correct index.
> > 
> > Not only do searches work fine, but the MoreLike request that failed  
> > actually returns a proper response. Perhaps one node is incorrect? Hard to  
> > debug due to multiple threads. Here is the exception:
> > 
> > org.elasticsearch.indices.IndexMissingException:  
> > [products-20120919-114007] missing  
> > at  
> > org.elasticsearch.indices.InternalIndicesService.indexServiceSafe(InternalIndicesService.java:243)  
> > at  
> > org.elasticsearch.action.mlt.TransportMoreLikeThisAction$1.onResponse(TransportMoreLikeThisAction.java:114)  
> > at  
> > org.elasticsearch.action.mlt.TransportMoreLikeThisAction$1.onResponse(TransportMoreLikeThisAction.java:105)  
> > at  
> > org.elasticsearch.action.support.TransportAction$ThreadedActionListener$1.run(TransportAction.java:86)  
> > at  
> > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)  
> > at  
> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)  
> > at java.lang.Thread.run(Thread.java:662)
> > 
> > Running ES 0.19.8 via the TransportClient. The index does not have shards  
> > on every node of the cluster due to the distribution of shards across the  
> > nodes. Shouldn't be an issue, just an FYI.
> > 
> > Cheers,
> > 
> > Ivan

--

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [September 27, 2012, 6:25am UTC](https://discuss.elastic.co/t/indexmissingexception-when-using-morelike/9164/4 "2012-09-27T06:25:55Z")

</div>

Thanks. I searched the mailing list (and found another with the same  
issue), but not the actual issues.

I suspected that not having the index have shards on every node might  
be a problem, which is why I mentioned it. I found other  
inconsistencies and created a full replication, but luckily you  
responded first.

Cheers,

Ivan

On Wed, Sep 26, 2012 at 5:54 PM, Igor Motov [imotov@gmail.com](mailto:imotov@gmail.com) wrote:

> It looks like [IndexMissingException when calling \_mlt on client node · Issue #2197 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/2197)  
> only instead of executing request on the node client, it fails when request  
> is getting executed on the node where your index doesn't have any shards.
> 
> On Wednesday, September 26, 2012 4:48:45 PM UTC-4, Ivan Brusic wrote:
> 
> > Quick correction: the failed MoreLike request does not return a valid  
> > response. My error handling code (inherited!) for exceptions was faulty.
> > 
> > On Wed, Sep 26, 2012 at 1:21 PM, Ivan Brusic [iv...@brusic.com](mailto:iv...@brusic.com) wrote:
> > 
> > > I have been getting occasional IndexMissingExceptions, but only when  
> > > using MoreLike. The request uses an alias and the exception points to the  
> > > correct index.
> > > 
> > > Not only do searches work fine, but the MoreLike request that failed  
> > > actually returns a proper response. Perhaps one node is incorrect? Hard to  
> > > debug due to multiple threads. Here is the exception:
> > > 
> > > org.elasticsearch.indices.IndexMissingException:  
> > > [products-20120919-114007] missing  
> > > at  
> > > org.elasticsearch.indices.InternalIndicesService.indexServiceSafe(InternalIndicesService.java:243)  
> > > at  
> > > org.elasticsearch.action.mlt.TransportMoreLikeThisAction$1.onResponse(TransportMoreLikeThisAction.java:114)  
> > > at  
> > > org.elasticsearch.action.mlt.TransportMoreLikeThisAction$1.onResponse(TransportMoreLikeThisAction.java:105)  
> > > at  
> > > org.elasticsearch.action.support.TransportAction$ThreadedActionListener$1.run(TransportAction.java:86)  
> > > at  
> > > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)  
> > > at  
> > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)  
> > > at java.lang.Thread.run(Thread.java:662)
> > > 
> > > Running ES 0.19.8 via the TransportClient. The index does not have shards  
> > > on every node of the cluster due to the distribution of shards across the  
> > > nodes. Shouldn't be an issue, just an FYI.
> > > 
> > > Cheers,
> > > 
> > > Ivan
> 
> --

--

---

<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, 3:11am UTC](https://discuss.elastic.co/t/indexmissingexception-when-using-morelike/9164/5 "2017-07-06T03:11:13Z")

</div>

Closed on July 6, 2017, 3:11am UTC


