How to fetch data from multiple index using join like sql

Please format your code using </> icon as explained in this guide. It will make your post more readable.

Or use markdown style like:

```
CODE
```

I edited your post.

In you example, what the user is searching for? users? blogposts?

Let say the later. Then index your documents as:

PUT /my_index/blogpost/1
{
  "title":    "Relationships",
  "body":     "It's complicated...",
  "user":     {
    "name":     "John Smith",
    "email":    "john@smith.com",
    "dob":      "1970/10/24"
  }
}

And you're done.