I have an ElasticSearch instance indexing a MongoDB database using the river by [richardwilly98](https://github.com/richardwilly98/elasticsearch-river-mongodb)

There are two types of documents that are indexed:

* documents referencing users
* documents representing users

When these objects are added to mongodb richardwilly98's [river](https://github.com/richardwilly98/elasticsearch-river-mongodb) generates something like the following:

* document = {'user': {"$id" :
"5159a004c87126641f4f9530" } }
* user\_document = {'\_id':"5159a004c87126641f4f9530",'username':'bob'}

If I perform a search for 'bob' i'd like any documents that reference the bob document to be returned. At the moment this doesn't happen because the username field is not related to the referencing documents in anyway.

Is it possible to do this? Does ElasticSearch have object references?

Thanks - let me know if I haven't been clear.