# Search users based on degree of connections - for typeahead functionality

**URL:** <https://discuss.elastic.co/t/search-users-based-on-degree-of-connections-for-typeahead-functionality/21934>\
**Category:** Elasticsearch\
**Created:** [January 30, 2015, 10:58pm UTC](https://discuss.elastic.co/t/search-users-based-on-degree-of-connections-for-typeahead-functionality/21934 "2015-01-30T22:58:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rajesh\_Shetty](https://avatars.discourse-cdn.com/v4/letter/r/ccd318/32.png) [@Rajesh\_Shetty](https://discuss.elastic.co/u/Rajesh_Shetty)\
**Post date:** [January 30, 2015, 10:58pm UTC](https://discuss.elastic.co/t/search-users-based-on-degree-of-connections-for-typeahead-functionality/21934/1 "2015-01-30T22:58:57Z")

</div>

I have implemented term search based on nGrams/Filters/tokenizers for  
typeahead functionality . Where user types parts of name and it brings up  
users matching to the typed text.

But I have requirement around data modeling and implementation, for when  
someone (user A) searches other users . It should bring users matching to  
his/her term based on following order.

- People whom I follow
- People who follow me
- Everyone else.

Has anyone solved this problem using elastic search?. If yes what should be  
the data model and mappings?

-Thanks  
Rajesh

--  
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/9b34b088-8e25-4119-a252-32a9ccbcb751%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9b34b088-8e25-4119-a252-32a9ccbcb751%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:35am UTC](https://discuss.elastic.co/t/search-users-based-on-degree-of-connections-for-typeahead-functionality/21934/2 "2017-07-06T00:35:29Z")

</div>


