# Query Users who has similar rating

**URL:** <https://discuss.elastic.co/t/query-users-who-has-similar-rating/239929>\
**Category:** Elasticsearch\
**Created:** [July 5, 2020, 3:54pm UTC](https://discuss.elastic.co/t/query-users-who-has-similar-rating/239929 "2020-07-05T15:54:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![recordable542](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/recordable542/32/69082_2.png) [@recordable542](https://discuss.elastic.co/u/recordable542)\
**Post date:** [July 5, 2020, 3:54pm UTC](https://discuss.elastic.co/t/query-users-who-has-similar-rating/239929/1 "2020-07-05T15:54:12Z")

</div>

index "users" has several columns

```auto
id(integer), name(string), rating(float)

```

e.g users  
1 steve 3.3  
2 jane 9.9  
3 bob 2.3  
4 taylor 5.5

when a user is given, (let's say {id:1 name:steve rating:3.3}  
I want to query other people order by rating similar to steve  
so result should be  
1.bob 2.taylor 3.jane

how do I achieve this?

---

<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:** [August 2, 2020, 3:54pm UTC](https://discuss.elastic.co/t/query-users-who-has-similar-rating/239929/2 "2020-08-02T15:54:16Z")

</div>

Closed on August 2, 2020, 3:54pm UTC

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