I am curious how one could efficiently filter results in a social network
using ElasticSearch. Let's say that a user wants to search for a phrase,
but only among documents authored by his friends. The user may have tens of
thousands (or more) friends which can change fairly often.
Using an OR Filter should work, but could result in huge JSON requests. A
FilterBuilder could be used instead, but does not seem very reusable. I was
not able to find the best Lucene solution, as it is not clear to me whether
a custom filter, multi phrase query, or other is best.
Any suggestions appreciated.