# Context suggester with weights

**URL:** <https://discuss.elastic.co/t/context-suggester-with-weights/135143>\
**Category:** Elasticsearch\
**Created:** [June 8, 2018, 11:46am UTC](https://discuss.elastic.co/t/context-suggester-with-weights/135143 "2018-06-08T11:46:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rs123](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@rs123](https://discuss.elastic.co/u/rs123)\
**Post date:** [June 8, 2018, 11:46am UTC](https://discuss.elastic.co/t/context-suggester-with-weights/135143/1 "2018-06-08T11:46:25Z")

</div>

I want to use context suggester with weights  
My Index:

> ```
> POST skg/_doc/
> {
> "suggest": {
> "input": ["san fisco","fisco"],
> "contexts": {
> "userid": ["96988658","96320800","65982461","65912563", "65906989"],
> "area" : ["a1","a2","a3","a4"]
> }
> }
> }
> 
> ```

Is it possible to have weight for every user id so that if search is done in multiple documents for a particular user, based on weights order of documents can be sorted?

---

<div class="post-metadata">

**Author:** ![rs123](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@rs123](https://discuss.elastic.co/u/rs123)\
**Post date:** [June 13, 2018, 7:52am UTC](https://discuss.elastic.co/t/context-suggester-with-weights/135143/2 "2018-06-13T07:52:58Z")

</div>

Not a single reply, why?

---

<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 11, 2018, 7:53am UTC](https://discuss.elastic.co/t/context-suggester-with-weights/135143/3 "2018-07-11T07:53:08Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
