I've got symfony2 project set up with elastica via FOSElasticaBundle. I've got indexing set up for User document(Mongo) using basic settings. Now when I do a search for users I'd like that search to be prioritized by specified user's followers (to be returned of the top of search). The followers are stored in separate document (structure: id, follower_id, folowee_id). What would be the best approach to do so?
FOSElasticaBundle: prioritizing followers in user search
150 views Asked by impiix At
1
Ok, so after research it seems that only way is to first make a find on follow document, then eventually merge results with find on user. First added indexing on follow entity like:
Now I can easily make a search with followee id and followers text string (prefix):