I illustrate my question with an example. Assume having a type named "post". Each post has a userid field which indicates its author. This is how the post is stored:
{
"_index": "test",
"_type": "post",
"_id": "10098259467307",
"_score": 1,
"_source": {
"text": "user 1 message",
"userid": 1,
"id": 10098259467307,
}}
Is there a way to extract the relationship between the users based on the co-occurrence of terms within the "text" field of posts which they have authored? For example, if there are two posts containing the word "elastic", what I would like to see is an edge between the posts' authors.