# Extension to MLT

**URL:** <https://discuss.elastic.co/t/extension-to-mlt/2874>\
**Category:** Elasticsearch\
**Created:** [March 28, 2010, 8:09am UTC](https://discuss.elastic.co/t/extension-to-mlt/2874 "2010-03-28T08:09:11Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ori\_Lahav](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ori_lahav/32/3340_2.png) [@Ori\_Lahav](https://discuss.elastic.co/u/Ori_Lahav)\
**Post date:** [March 28, 2010, 8:09am UTC](https://discuss.elastic.co/t/extension-to-mlt/2874/1 "2010-03-28T08:09:11Z")

</div>

Hi  
As far as I saw in the MLT (0.5) documentation, you can onlt query MLT  
for a document that is already indexed.  
We are looking for slightly different implementation where the input  
document is a URL that the server extracts the most significant  
keywords from and returns the similar docs.

any idea if ES support it?

---

<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:** [March 28, 2010, 10:05am UTC](https://discuss.elastic.co/t/extension-to-mlt/2874/2 "2010-03-28T10:05:59Z")

</div>

elasticsearch has the option the execute a moreLikeThis query, which is part  
of the query dsl. When using the query, you just provide it with a text to  
find docs that match it, so, in your case, fetch the doc, get the text from  
it, and execute a moreLikeThis query.

-shay.banon

On Sun, Mar 28, 2010 at 11:09 AM, Ori Lahav [olahav@gmail.com](mailto:olahav@gmail.com) wrote:

> Hi  
> As far as I saw in the MLT (0.5) documentation, you can onlt query MLT  
> for a document that is already indexed.  
> We are looking for slightly different implementation where the input  
> document is a URL that the server extracts the most significant  
> keywords from and returns the similar docs.
> 
> any idea if ES support it?

---

<div class="post-metadata">

**Author:** ![Ori\_Lahav](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ori_lahav/32/3340_2.png) [@Ori\_Lahav](https://discuss.elastic.co/u/Ori_Lahav)\
**Post date:** [March 28, 2010, 2:33pm UTC](https://discuss.elastic.co/t/extension-to-mlt/2874/3 "2010-03-28T14:33:20Z")

</div>

Got you.  
So it is not as Solr where instead of text you can give it a URL to fetch  
the text from.

On Sun, Mar 28, 2010 at 12:05 PM, Shay Banon  
[shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com)wrote:

> elasticsearch has the option the execute a moreLikeThis query, which is  
> part of the query dsl. When using the query, you just provide it with a text  
> to find docs that match it, so, in your case, fetch the doc, get the text  
> from it, and execute a moreLikeThis query.
> 
> -shay.banon
> 
> On Sun, Mar 28, 2010 at 11:09 AM, Ori Lahav [olahav@gmail.com](mailto:olahav@gmail.com) wrote:
> 
> > Hi  
> > As far as I saw in the MLT (0.5) documentation, you can onlt query MLT  
> > for a document that is already indexed.  
> > We are looking for slightly different implementation where the input  
> > document is a URL that the server extracts the most significant  
> > keywords from and returns the similar docs.
> > 
> > any idea if ES support it?

--  
[http://olahav.typepad.com](http://olahav.typepad.com)

---

<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:** [March 28, 2010, 4:11pm UTC](https://discuss.elastic.co/t/extension-to-mlt/2874/4 "2010-03-28T16:11:06Z")

</div>

I have no idea how Solr does it.

-shay.banon

On Sun, Mar 28, 2010 at 5:33 PM, Ori Lahav [olahav@gmail.com](mailto:olahav@gmail.com) wrote:

> Got you.  
> So it is not as Solr where instead of text you can give it a URL to fetch  
> the text from.
> 
> On Sun, Mar 28, 2010 at 12:05 PM, Shay Banon \<[shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com)
> 
> > wrote:
> 
> > elasticsearch has the option the execute a moreLikeThis query, which is  
> > part of the query dsl. When using the query, you just provide it with a text  
> > to find docs that match it, so, in your case, fetch the doc, get the text  
> > from it, and execute a moreLikeThis query.
> > 
> > -shay.banon
> > 
> > On Sun, Mar 28, 2010 at 11:09 AM, Ori Lahav [olahav@gmail.com](mailto:olahav@gmail.com) wrote:
> > 
> > > Hi  
> > > As far as I saw in the MLT (0.5) documentation, you can onlt query MLT  
> > > for a document that is already indexed.  
> > > We are looking for slightly different implementation where the input  
> > > document is a URL that the server extracts the most significant  
> > > keywords from and returns the similar docs.
> > > 
> > > any idea if ES support it?
> 
> --  
> [http://olahav.typepad.com](http://olahav.typepad.com)

---

<div class="post-metadata">

**Author:** ![Yatir\_Ben\_Shlomo\_2](https://avatars.discourse-cdn.com/v4/letter/y/76d3ee/32.png) [@Yatir\_Ben\_Shlomo\_2](https://discuss.elastic.co/u/Yatir_Ben_Shlomo_2)\
**Post date:** [May 24, 2010, 1:38pm UTC](https://discuss.elastic.co/t/extension-to-mlt/2874/5 "2010-05-24T13:38:53Z")

</div>

just fyi,  
In solr mlt you can supply a url as a paramter to the request, and  
solr will access this url, interpret the response as the contents of a  
document, tokenize it and extract the interesting words from it and  
use it to perform an MLT query

On Mar 28, 7:11 pm, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:

> I have no idea how Solr does it.
> 
> -shay.banon
> 
> On Sun, Mar 28, 2010 at 5:33 PM, Ori Lahav [ola...@gmail.com](mailto:ola...@gmail.com) wrote:
> 
> > Got you.  
> > So it is not as Solr where instead of text you can give it a URL to fetch  
> > the text from.
> 
> > On Sun, Mar 28, 2010 at 12:05 PM, Shay Banon \<[shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com)
> > 
> > > wrote:
> 
> > > elasticsearch has the option the execute a moreLikeThis query, which is  
> > > part of the query dsl. When using the query, you just provide it with a text  
> > > to find docs that match it, so, in your case, fetch the doc, get the text  
> > > from it, and execute a moreLikeThis query.
> 
> > > -shay.banon
> 
> > > On Sun, Mar 28, 2010 at 11:09 AM, Ori Lahav [ola...@gmail.com](mailto:ola...@gmail.com) wrote:
> 
> > > > Hi  
> > > > As far as I saw in the MLT (0.5) documentation, you can onlt query MLT  
> > > > for a document that is already indexed.  
> > > > We are looking for slightly different implementation where the input  
> > > > document is a URL that the server extracts the most significant  
> > > > keywords from and returns the similar docs.
> 
> > > > any idea if ES support it?
> 
> > --  
> > [http://olahav.typepad.com](http://olahav.typepad.com)

---

<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:** [May 24, 2010, 6:32pm UTC](https://discuss.elastic.co/t/extension-to-mlt/2874/6 "2010-05-24T18:32:44Z")

</div>

I understand what it means. If you want this feature, then open a feature  
request for this. In general, I prefer not to rely on external resources in  
elasticsearch, and if I do, it should be done correctly. Meaning, in this  
case, to use async io to fetch the doc, and _not_ block a thread on io  
operation, which needs developing.

-shay.banon

On Mon, May 24, 2010 at 4:38 PM, Yatir Ben Shlomo [maanit.arch@gmail.com](mailto:maanit.arch@gmail.com)wrote:

> just fyi,  
> In solr mlt you can supply a url as a paramter to the request, and  
> solr will access this url, interpret the response as the contents of a  
> document, tokenize it and extract the interesting words from it and  
> use it to perform an MLT query
> 
> On Mar 28, 7:11 pm, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:
> 
> > I have no idea how Solr does it.
> > 
> > -shay.banon
> > 
> > On Sun, Mar 28, 2010 at 5:33 PM, Ori Lahav [ola...@gmail.com](mailto:ola...@gmail.com) wrote:
> > 
> > > Got you.  
> > > So it is not as Solr where instead of text you can give it a URL to  
> > > fetch  
> > > the text from.
> > 
> > > On Sun, Mar 28, 2010 at 12:05 PM, Shay Banon \<  
> > > [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com)
> > > 
> > > > wrote:
> > 
> > > > elasticsearch has the option the execute a moreLikeThis query, which  
> > > > is  
> > > > part of the query dsl. When using the query, you just provide it with  
> > > > a text  
> > > > to find docs that match it, so, in your case, fetch the doc, get the  
> > > > text  
> > > > from it, and execute a moreLikeThis query.
> > 
> > > > -shay.banon
> > 
> > > > On Sun, Mar 28, 2010 at 11:09 AM, Ori Lahav [ola...@gmail.com](mailto:ola...@gmail.com) wrote:
> > 
> > > > > Hi  
> > > > > As far as I saw in the MLT (0.5) documentation, you can onlt query  
> > > > > MLT  
> > > > > for a document that is already indexed.  
> > > > > We are looking for slightly different implementation where the input  
> > > > > document is a URL that the server extracts the most significant  
> > > > > keywords from and returns the similar docs.
> > 
> > > > > any idea if ES support it?
> > 
> > > --  
> > > [http://olahav.typepad.com](http://olahav.typepad.com)

---

<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:** [May 25, 2010, 6:47pm UTC](https://discuss.elastic.co/t/extension-to-mlt/2874/7 "2010-05-25T18:47:13Z")

</div>

By the way, if you want to provide the text for the search, then you  
probably want to use the search API, with an mlt query. The mlt query allows  
to provide the text to do mlt on. In this case, you fetch the text from the  
url on the client side, and execute the search query with the text  
populated. This makes more sense then fetching the text on each search shard  
side.

cheers,  
shay.banon

On Mon, May 24, 2010 at 9:32 PM, Shay Banon [shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com)wrote:

> I understand what it means. If you want this feature, then open a feature  
> request for this. In general, I prefer not to rely on external resources in  
> elasticsearch, and if I do, it should be done correctly. Meaning, in this  
> case, to use async io to fetch the doc, and _not_ block a thread on io  
> operation, which needs developing.
> 
> -shay.banon
> 
> On Mon, May 24, 2010 at 4:38 PM, Yatir Ben Shlomo [maanit.arch@gmail.com](mailto:maanit.arch@gmail.com)wrote:
> 
> > just fyi,  
> > In solr mlt you can supply a url as a paramter to the request, and  
> > solr will access this url, interpret the response as the contents of a  
> > document, tokenize it and extract the interesting words from it and  
> > use it to perform an MLT query
> > 
> > On Mar 28, 7:11 pm, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:
> > 
> > > I have no idea how Solr does it.
> > > 
> > > -shay.banon
> > > 
> > > On Sun, Mar 28, 2010 at 5:33 PM, Ori Lahav [ola...@gmail.com](mailto:ola...@gmail.com) wrote:
> > > 
> > > > Got you.  
> > > > So it is not as Solr where instead of text you can give it a URL to  
> > > > fetch  
> > > > the text from.
> > > 
> > > > On Sun, Mar 28, 2010 at 12:05 PM, Shay Banon \<  
> > > > [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com)
> > > > 
> > > > > wrote:
> > > 
> > > > > elasticsearch has the option the execute a moreLikeThis query, which  
> > > > > is  
> > > > > part of the query dsl. When using the query, you just provide it with  
> > > > > a text  
> > > > > to find docs that match it, so, in your case, fetch the doc, get the  
> > > > > text  
> > > > > from it, and execute a moreLikeThis query.
> > > 
> > > > > -shay.banon
> > > 
> > > > > On Sun, Mar 28, 2010 at 11:09 AM, Ori Lahav [ola...@gmail.com](mailto:ola...@gmail.com)  
> > > > > wrote:
> > > 
> > > > > > Hi  
> > > > > > As far as I saw in the MLT (0.5) documentation, you can onlt query  
> > > > > > MLT  
> > > > > > for a document that is already indexed.  
> > > > > > We are looking for slightly different implementation where the input  
> > > > > > document is a URL that the server extracts the most significant  
> > > > > > keywords from and returns the similar docs.
> > > 
> > > > > > any idea if ES support it?
> > > 
> > > > --  
> > > > [http://olahav.typepad.com](http://olahav.typepad.com)

---

<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, 4:23am UTC](https://discuss.elastic.co/t/extension-to-mlt/2874/8 "2017-07-06T04:23:51Z")

</div>


