We build a social network application and we use ES to enable our users to
browse content with facets and text search.
Everything works fine.
Now we would like to enable the users to filter what they have read or not,
what they have starred... .
I want all the documents containing MAPPING, tagged with ES which I've not
already read, and the corresponding facets
Here comes the issue.
I'm destroying my brain thinking about a way to model this.
1- For each posts, I add a nested object containing the userId and the
readDate of ALL the readers. What if there are 100 000 users or more ?
Is it an issue for ES to manage so much nested object ?
Is it possible to retrieve only the nested object corresponding to the user
who makes the query ?
2- Use a parent child mapping. But joins are not possible. Or I miss
3- Get the documents without the user's specific data and query the
database to get them. But the facet's count will be wrong.
Any idea ? I'm pretty sure I'm not the only one to have this issue.