# Elasticsearch - Suggest - Completion - Score on different inputs

**URL:** <https://discuss.elastic.co/t/elasticsearch-suggest-completion-score-on-different-inputs/15379>\
**Category:** Elasticsearch\
**Created:** [January 23, 2014, 11:20am UTC](https://discuss.elastic.co/t/elasticsearch-suggest-completion-score-on-different-inputs/15379 "2014-01-23T11:20:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fabian\_Kostring](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fabian_kostring/32/1310_2.png) [@Fabian\_Kostring](https://discuss.elastic.co/u/Fabian_Kostring)\
**Post date:** [January 23, 2014, 11:20am UTC](https://discuss.elastic.co/t/elasticsearch-suggest-completion-score-on-different-inputs/15379/1 "2014-01-23T11:20:30Z")

</div>

Hey there!

Is there a way to tell elasticsearch that an input of the completion type  
should be scored differently than other?

Maybe somethings like this? (Just typed)

{

"name" : "Hotel Monaco",

"city" : "Munich",

"name\_suggest" : {

"input" : [

"Monaco Munich" : {"score" : 1.0},

"Hotel Monaco" : {"score" : 0.8},

],

"output": "Hotel Monaco"

}

}

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/87fdbdb3-b425-480b-9e11-f59fb50cea59%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/87fdbdb3-b425-480b-9e11-f59fb50cea59%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:** ![georgi\_mateev](https://avatars.discourse-cdn.com/v4/letter/g/a6a055/32.png) [@georgi\_mateev](https://discuss.elastic.co/u/georgi_mateev)\
**Post date:** [January 23, 2014, 8:29pm UTC](https://discuss.elastic.co/t/elasticsearch-suggest-completion-score-on-different-inputs/15379/2 "2014-01-23T20:29:47Z")

</div>

You can try to use weights

Am Donnerstag, 23. Januar 2014 12:20:30 UTC+1 schrieb Fabian Köstring:

> Hey there!
> 
> Is there a way to tell elasticsearch that an input of the completion type  
> should be scored differently than other?
> 
> Maybe somethings like this? (Just typed)
> 
> {
> 
> "name" : "Hotel Monaco",
> 
> "city" : "Munich",
> 
> "name\_suggest" : {
> 
> "input" : [
> 
> "Monaco Munich" : {"score" : 1.0},
> 
> "Hotel Monaco" : {"score" : 0.8},
> 
> ],
> 
> "output": "Hotel Monaco"
> 
> }
> 
> }
> 
> 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/9e5fe8fb-d204-48a7-a7b7-40ef75189c81%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9e5fe8fb-d204-48a7-a7b7-40ef75189c81%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:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [January 27, 2014, 10:13am UTC](https://discuss.elastic.co/t/elasticsearch-suggest-completion-score-on-different-inputs/15379/3 "2014-01-27T10:13:53Z")

</div>

Hey,

right now the weight only has impact for the output.

A possible workaround could be, that you use your own index for  
suggestions. And create own documents with different weights, one for  
"Monaco Munich", one for "Hotel Monaco" and then use payloads to refer to  
the original entry in the index containing the documents. Still I am not  
sure, if this completely covers your use-case. Maybe you can tell, what  
exactly you want to do (or if this is sufficient).

--Alex

On Thu, Jan 23, 2014 at 9:29 PM, [georgi.mateev@jobvector.com](mailto:georgi.mateev@jobvector.com) wrote:

> You can try to use weights
> 
> Am Donnerstag, 23. Januar 2014 12:20:30 UTC+1 schrieb Fabian Köstring:
> 
> > Hey there!
> > 
> > Is there a way to tell elasticsearch that an input of the completion type  
> > should be scored differently than other?
> > 
> > Maybe somethings like this? (Just typed)
> > 
> > {
> > 
> > "name" : "Hotel Monaco",
> > 
> > "city" : "Munich",
> > 
> > "name\_suggest" : {
> > 
> > "input" : [
> > 
> > "Monaco Munich" : {"score" : 1.0},
> > 
> > "Hotel Monaco" : {"score" : 0.8},
> > 
> > ],
> > 
> > "output": "Hotel Monaco"
> > 
> > }
> > 
> > }
> > 
> > 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/9e5fe8fb-d204-48a7-a7b7-40ef75189c81%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9e5fe8fb-d204-48a7-a7b7-40ef75189c81%40googlegroups.com)  
> .
> 
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/CAGCwEM-hQu-uUm\_UL30VBZywYWsOfCDaMCLW8tjUB9%2BncOJgnQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGCwEM-hQu-uUm_UL30VBZywYWsOfCDaMCLW8tjUB9%2BncOJgnQ%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:** ![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:54am UTC](https://discuss.elastic.co/t/elasticsearch-suggest-completion-score-on-different-inputs/15379/4 "2017-07-06T01:54:41Z")

</div>


