# Get best entry/entries most likely using independent terms

**URL:** <https://discuss.elastic.co/t/get-best-entry-entries-most-likely-using-independent-terms/22909>\
**Category:** Elasticsearch\
**Created:** [March 25, 2015, 11:22pm UTC](https://discuss.elastic.co/t/get-best-entry-entries-most-likely-using-independent-terms/22909 "2015-03-25T23:22:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nuno\_Ferreira](https://avatars.discourse-cdn.com/v4/letter/n/7c8e57/32.png) [@Nuno\_Ferreira](https://discuss.elastic.co/u/Nuno_Ferreira)\
**Post date:** [March 25, 2015, 11:22pm UTC](https://discuss.elastic.co/t/get-best-entry-entries-most-likely-using-independent-terms/22909/1 "2015-03-25T23:22:29Z")

</div>

Hi,

I need to get the best entries when comparing strings to one field. For  
example I have I field that are the people favourite colors.

Person 1 {Name:Ben; Age:30; Colors{Blue,Yellow,Black}}  
Person 2 {Name:Linda; Age:10; Colors{Black,Green,White}}  
Person 3 {Name:Clark; Age:22; Colors{Blue,Red,Purple}}  
Person 4 {Name:Jerry; Age:20; Colors{Orange,Yellow,Grey}}

And I get Colors Blue and Yellow.  
Expected results  
Person 1 score 2  
Person 4 score 1  
Person 3 score 1  
Person 2 score 0

I search foruns for this answer but I didn't found it, can anyone help me ?

Thanks

--  
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/f8317744-4940-45c2-b580-9c7715f15fb1%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f8317744-4940-45c2-b580-9c7715f15fb1%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:23am UTC](https://discuss.elastic.co/t/get-best-entry-entries-most-likely-using-independent-terms/22909/2 "2017-07-06T00:23:55Z")

</div>

Closed on July 6, 2017, 12:23am UTC


