# Is it possible to add yet another score value based on similarity (same words) to differentiate between two \_scores?

**URL:** <https://discuss.elastic.co/t/is-it-possible-to-add-yet-another-score-value-based-on-similarity-same-words-to-differentiate-between-two--scores/19592>\
**Category:** Elasticsearch\
**Created:** [September 3, 2014, 2:16pm UTC](https://discuss.elastic.co/t/is-it-possible-to-add-yet-another-score-value-based-on-similarity-same-words-to-differentiate-between-two--scores/19592 "2014-09-03T14:16:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pontus\_Lundin](https://avatars.discourse-cdn.com/v4/letter/p/5daacb/32.png) [@Pontus\_Lundin](https://discuss.elastic.co/u/Pontus_Lundin)\
**Post date:** [September 3, 2014, 2:16pm UTC](https://discuss.elastic.co/t/is-it-possible-to-add-yet-another-score-value-based-on-similarity-same-words-to-differentiate-between-two--scores/19592/1 "2014-09-03T14:16:59Z")

</div>

Hi!

I have created an multi\_field index with one field analyzed  
(with edgengram, min:3, max:15) and the other one not. Then i am doing a  
multi match on this and get relevant hits.I am doing this to find exact  
matches which seems to work.

So far so good, however how do i separate hits that are "really" relevant  
(i.e the words are equal but might be in another order etc) to my search  
string and "false-positive" results from the ngram which can have very  
different meaning.

An example would be:

_query_:Crankshaft position sensor  
_hits_:Position Sensor, Crankshaft

This is a very good and similar results and the score is equal to max score.

However i can not determinate and draw any conclusion rom oly compare the  
score value becuase another example could yield the same score but should  
not rank as hight becuase the meaning is different.

_query_:Motoroil  
_hit_:Motorblock

This is "not relevant" but ofcourse originates from the ngram. The hit  
score is equal to Max score.  
Of course i could increate the min and max on the ngram but it  
seems usefull for other cases so not really an option.

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/f821aa7e-f666-430f-b4cb-7ed1796c0722%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f821aa7e-f666-430f-b4cb-7ed1796c0722%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 4, 2014, 4:48pm UTC](https://discuss.elastic.co/t/is-it-possible-to-add-yet-another-score-value-based-on-similarity-same-words-to-differentiate-between-two--scores/19592/2 "2014-09-04T16:48:09Z")

</div>

Can you simply boost the non analyzed field? If the scores are still too  
similar, try using a dis\_max query with the non analyzed query getting a  
higher boost:

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

--  
Ivan

On Wed, Sep 3, 2014 at 7:16 AM, Pontus Lundin [lundin.codeitez@gmail.com](mailto:lundin.codeitez@gmail.com)  
wrote:

> Hi!
> 
> I have created an multi\_field index with one field analyzed  
> (with edgengram, min:3, max:15) and the other one not. Then i am doing a  
> multi match on this and get relevant hits.I am doing this to find exact  
> matches which seems to work.
> 
> So far so good, however how do i separate hits that are "really" relevant  
> (i.e the words are equal but might be in another order etc) to my search  
> string and "false-positive" results from the ngram which can have very  
> different meaning.
> 
> An example would be:
> 
> _query_:Crankshaft position sensor  
> _hits_:Position Sensor, Crankshaft
> 
> This is a very good and similar results and the score is equal to max  
> score.
> 
> However i can not determinate and draw any conclusion rom oly compare the  
> score value becuase another example could yield the same score but should  
> not rank as hight becuase the meaning is different.
> 
> _query_:Motoroil  
> _hit_:Motorblock
> 
> This is "not relevant" but ofcourse originates from the ngram. The hit  
> score is equal to Max score.  
> Of course i could increate the min and max on the ngram but it  
> seems usefull for other cases so not really an option.
> 
> 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/f821aa7e-f666-430f-b4cb-7ed1796c0722%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f821aa7e-f666-430f-b4cb-7ed1796c0722%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/f821aa7e-f666-430f-b4cb-7ed1796c0722%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/f821aa7e-f666-430f-b4cb-7ed1796c0722%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CALY%3DcQCdE\_%2B8qMy1fE8z9vPv4M3Kc5ZrunMtDdfGuGVwCJnr3g%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCdE_%2B8qMy1fE8z9vPv4M3Kc5ZrunMtDdfGuGVwCJnr3g%40mail.gmail.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, 1:04am UTC](https://discuss.elastic.co/t/is-it-possible-to-add-yet-another-score-value-based-on-similarity-same-words-to-differentiate-between-two--scores/19592/3 "2017-07-06T01:04:20Z")

</div>


