# Bug: \_mlt on a document does not route properly on node clients

**URL:** <https://discuss.elastic.co/t/bug--mlt-on-a-document-does-not-route-properly-on-node-clients/8808>\
**Category:** Elasticsearch\
**Created:** [August 22, 2012, 6:40am UTC](https://discuss.elastic.co/t/bug--mlt-on-a-document-does-not-route-properly-on-node-clients/8808 "2012-08-22T06:40:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jack\_Chen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jack_chen/32/2464_2.png) [@Jack\_Chen](https://discuss.elastic.co/u/Jack_Chen)\
**Post date:** [August 22, 2012, 6:40am UTC](https://discuss.elastic.co/t/bug--mlt-on-a-document-does-not-route-properly-on-node-clients/8808/1 "2012-08-22T06:40:02Z")

</div>

I think I've found a bug with ElasticSearch with \_mlt and node clients.

We're running 0.19.8.

We have two data nodes and each app server has its own ES instance running  
in node client mode. Searches and normal document GETs work fine, however  
when running \_mlt on a client node, I get an IndexMissingException. The  
exact same query works fine on the data node. I suspect \_mlt is only  
checking the local \_mlt

To sum it up:

On data node:  
$ curl [http://localhost:9200/foo/bar/1](http://localhost:9200/foo/bar/1) # Works  
$ curl [http://localhost:9200/foo/bar/1/\_mlt](http://localhost:9200/foo/bar/1/_mlt) # Works

On client node:  
$ curl [http://localhost:9200/foo/bar/1](http://localhost:9200/foo/bar/1) # Works  
$ curl [http://localhost:9200/foo/bar/1/\_mlt](http://localhost:9200/foo/bar/1/_mlt) # Fails with  
IndexMissingException

--

---

<div class="post-metadata">

**Author:** ![Jack\_Chen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jack_chen/32/2464_2.png) [@Jack\_Chen](https://discuss.elastic.co/u/Jack_Chen)\
**Post date:** [August 22, 2012, 6:47am UTC](https://discuss.elastic.co/t/bug--mlt-on-a-document-does-not-route-properly-on-node-clients/8808/2 "2012-08-22T06:47:21Z")

</div>

So just to clarify, the client nodes are joined correctly in the cluster,  
so search works perfectly fine as well.

On Wednesday, 22 August 2012 16:40:02 UTC+10, Jack Chen wrote:

> I think I've found a bug with Elasticsearch with \_mlt and node clients.
> 
> We're running 0.19.8.
> 
> We have two data nodes and each app server has its own ES instance running  
> in node client mode. Searches and normal document GETs work fine, however  
> when running \_mlt on a client node, I get an IndexMissingException. The  
> exact same query works fine on the data node. I suspect \_mlt is only  
> checking the local \_mlt
> 
> To sum it up:
> 
> On data node:  
> $ curl [http://localhost:9200/foo/bar/1](http://localhost:9200/foo/bar/1) # Works  
> $ curl [http://localhost:9200/foo/bar/1/\_mlt](http://localhost:9200/foo/bar/1/_mlt) # Works
> 
> On client node:  
> $ curl [http://localhost:9200/foo/bar/1](http://localhost:9200/foo/bar/1) # Works  
> $ curl [http://localhost:9200/foo/bar/1/\_mlt](http://localhost:9200/foo/bar/1/_mlt) # Fails with  
> IndexMissingException

--

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [August 22, 2012, 10:43am UTC](https://discuss.elastic.co/t/bug--mlt-on-a-document-does-not-route-properly-on-node-clients/8808/3 "2012-08-22T10:43:32Z")

</div>

Can you open an issue with a gist recreation, we will have a look at it.

On Wednesday, August 22, 2012 8:47:21 AM UTC+2, Jack Chen wrote:

> So just to clarify, the client nodes are joined correctly in the cluster,  
> so search works perfectly fine as well.
> 
> On Wednesday, 22 August 2012 16:40:02 UTC+10, Jack Chen wrote:
> 
> > I think I've found a bug with Elasticsearch with \_mlt and node clients.
> > 
> > We're running 0.19.8.
> > 
> > We have two data nodes and each app server has its own ES instance  
> > running in node client mode. Searches and normal document GETs work fine,  
> > however when running \_mlt on a client node, I get an IndexMissingException.  
> > The exact same query works fine on the data node. I suspect \_mlt is only  
> > checking the local \_mlt
> > 
> > To sum it up:
> > 
> > On data node:  
> > $ curl [http://localhost:9200/foo/bar/1](http://localhost:9200/foo/bar/1) # Works  
> > $ curl [http://localhost:9200/foo/bar/1/\_mlt](http://localhost:9200/foo/bar/1/_mlt) # Works
> > 
> > On client node:  
> > $ curl [http://localhost:9200/foo/bar/1](http://localhost:9200/foo/bar/1) # Works  
> > $ curl [http://localhost:9200/foo/bar/1/\_mlt](http://localhost:9200/foo/bar/1/_mlt) # Fails with  
> > IndexMissingException

--

---

<div class="post-metadata">

**Author:** ![Jack\_Chen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jack_chen/32/2464_2.png) [@Jack\_Chen](https://discuss.elastic.co/u/Jack_Chen)\
**Post date:** [August 23, 2012, 2:07am UTC](https://discuss.elastic.co/t/bug--mlt-on-a-document-does-not-route-properly-on-node-clients/8808/4 "2012-08-23T02:07:55Z")

</div>

My colleague has raised an  
issue: [IndexMissingException when calling \_mlt on client node · Issue #2197 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/2197)

On Wednesday, 22 August 2012 20:43:32 UTC+10, kimchy wrote:

> Can you open an issue with a gist recreation, we will have a look at it.
> 
> On Wednesday, August 22, 2012 8:47:21 AM UTC+2, Jack Chen wrote:
> 
> > So just to clarify, the client nodes are joined correctly in the cluster,  
> > so search works perfectly fine as well.
> > 
> > On Wednesday, 22 August 2012 16:40:02 UTC+10, Jack Chen wrote:
> > 
> > > I think I've found a bug with Elasticsearch with \_mlt and node clients.
> > > 
> > > We're running 0.19.8.
> > > 
> > > We have two data nodes and each app server has its own ES instance  
> > > running in node client mode. Searches and normal document GETs work fine,  
> > > however when running \_mlt on a client node, I get an IndexMissingException.  
> > > The exact same query works fine on the data node. I suspect \_mlt is only  
> > > checking the local \_mlt
> > > 
> > > To sum it up:
> > > 
> > > On data node:  
> > > $ curl [http://localhost:9200/foo/bar/1](http://localhost:9200/foo/bar/1) # Works  
> > > $ curl [http://localhost:9200/foo/bar/1/\_mlt](http://localhost:9200/foo/bar/1/_mlt) # Works
> > > 
> > > On client node:  
> > > $ curl [http://localhost:9200/foo/bar/1](http://localhost:9200/foo/bar/1) # Works  
> > > $ curl [http://localhost:9200/foo/bar/1/\_mlt](http://localhost:9200/foo/bar/1/_mlt) # Fails with  
> > > IndexMissingException

--

---

<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:15am UTC](https://discuss.elastic.co/t/bug--mlt-on-a-document-does-not-route-properly-on-node-clients/8808/5 "2017-07-06T03:15:25Z")

</div>

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


