# 'More Like This'-functionality suited for comparing entities?

**URL:** <https://discuss.elastic.co/t/more-like-this-functionality-suited-for-comparing-entities/15112>\
**Category:** Elasticsearch\
**Created:** [January 6, 2014, 11:15am UTC](https://discuss.elastic.co/t/more-like-this-functionality-suited-for-comparing-entities/15112 "2014-01-06T11:15:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maarten\_Roosendaal](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@Maarten\_Roosendaal](https://discuss.elastic.co/u/Maarten_Roosendaal)\
**Post date:** [January 6, 2014, 11:15am UTC](https://discuss.elastic.co/t/more-like-this-functionality-suited-for-comparing-entities/15112/1 "2014-01-06T11:15:57Z")

</div>

Hi,

We want to be able to suggest entities to customers that are similair to  
their entity. For example, i create a \*wishlist \*and add 10 products to  
that list. Another customer also created a wishlist with 20 products on it  
and there are \*6 \*products that are the \*same \*on both lists. We want to be  
able to suggest the list from the other customer to myself.

The 'more like this' API seems like it can be used but there is very little  
control over what you can configure. The more like this query is more  
flexible but i don't want to provide text, i simply want to say: "search  
lists that are like mine based on the array of productId's from my list  
where there should be at least 5 (exact) matches".

Is this possible with elasticsearch? If so, which way to go?

Thanks,  
Maarten

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/409ba68b-36d4-4502-b05e-11d7858c1041%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/409ba68b-36d4-4502-b05e-11d7858c1041%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Maarten\_Roosendaal](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@Maarten\_Roosendaal](https://discuss.elastic.co/u/Maarten_Roosendaal)\
**Post date:** [January 6, 2014, 11:33am UTC](https://discuss.elastic.co/t/more-like-this-functionality-suited-for-comparing-entities/15112/2 "2014-01-06T11:33:54Z")

</div>

as a side note: i've modelled a product as a nested document inside the  
list-entity

Op maandag 6 januari 2014 12:15:57 UTC+1 schreef Maarten Roosendaal:

> Hi,
> 
> We want to be able to suggest entities to customers that are similair to  
> their entity. For example, i create a \*wishlist \*and add 10 products to  
> that list. Another customer also created a wishlist with 20 products on it  
> and there are \*6 \*products that are the \*same \*on both lists. We want to  
> be able to suggest the list from the other customer to myself.
> 
> The 'more like this' API seems like it can be used but there is very  
> little control over what you can configure. The more like this query is  
> more flexible but i don't want to provide text, i simply want to say:  
> "search lists that are like mine based on the array of productId's from my  
> list where there should be at least 5 (exact) matches".
> 
> Is this possible with elasticsearch? If so, which way to go?
> 
> Thanks,  
> Maarten

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/7d83108f-a468-4416-bdd6-09868cfad883%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/7d83108f-a468-4416-bdd6-09868cfad883%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [January 6, 2014, 12:42pm UTC](https://discuss.elastic.co/t/more-like-this-functionality-suited-for-comparing-entities/15112/3 "2014-01-06T12:42:13Z")

</div>

Have you tried  
[http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-mlt-query.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-mlt-query.html)

You don't have to provide "text", instead, just provide the user's wishlist  
you want similar wishlists to.

Jörg

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoG%3DStxtkJHGDXJTJDX1RV0CiQWC1%2Br9NJNOYhv5gbLpmg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoG%3DStxtkJHGDXJTJDX1RV0CiQWC1%2Br9NJNOYhv5gbLpmg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Maarten\_Roosendaal](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@Maarten\_Roosendaal](https://discuss.elastic.co/u/Maarten_Roosendaal)\
**Post date:** [January 6, 2014, 6:17pm UTC](https://discuss.elastic.co/t/more-like-this-functionality-suited-for-comparing-entities/15112/4 "2014-01-06T18:17:40Z")

</div>

Hi,

Not yet, what i did was:

- flatten the data to 1 property (productIds) so it is an array of  
productId's
- use the API  
and it worked quite nicely, but i have no control over other things like,  
only compare to lists with more than 5 productId's.

What i'm not certain of if i could use nested objects instead of  
productId's. I could of course do both!

Firstly I'll try to rewrite the mtl API as an mtl query so i get the same  
result, from that point on i'll use your link to configure a more precise  
result.

Thanks,  
Maarten

Op maandag 6 januari 2014 13:42:13 UTC+1 schreef Jörg Prante:

> Have you tried  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-mlt-query.html)
> 
> You don't have to provide "text", instead, just provide the user's  
> wishlist you want similar wishlists to.
> 
> Jörg

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/e12bc909-5bd8-4d01-9a75-ec40678e7d89%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e12bc909-5bd8-4d01-9a75-ec40678e7d89%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Maarten\_Roosendaal](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@Maarten\_Roosendaal](https://discuss.elastic.co/u/Maarten_Roosendaal)\
**Post date:** [January 7, 2014, 8:17am UTC](https://discuss.elastic.co/t/more-like-this-functionality-suited-for-comparing-entities/15112/5 "2014-01-07T08:17:50Z")

</div>

Hi Jörg,

How do i proved the user's wishlist when using the mlt query?  
i've tried:

GET [http://localhost:9200/wishlists/list/](http://localhost:9200/wishlists/list/)_[id user's wishlist_]/\_search/  
{  
"more\_like\_this" : {  
"fields" : ["product\_id"],  
"min\_term\_freq" : 1,  
"max\_query\_terms" : 12  
}  
}

but it does not work.

Op maandag 6 januari 2014 13:42:13 UTC+1 schreef Jörg Prante:

> Have you tried  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-mlt-query.html)
> 
> You don't have to provide "text", instead, just provide the user's  
> wishlist you want similar wishlists to.
> 
> Jörg

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/2b322095-c155-4748-93c5-d0047a6aa036%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2b322095-c155-4748-93c5-d0047a6aa036%40googlegroups.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, 1:58am UTC](https://discuss.elastic.co/t/more-like-this-functionality-suited-for-comparing-entities/15112/6 "2017-07-06T01:58:06Z")

</div>


