'Can we index data from different mongodb collections as one single document on solr

What I am trying to do is that there are different microservices which uses its own collections. I want to create one single document on solr which contains information from all these collections. Would that be possible to achieve using mongo connectors for solr?

eg: collection 1 has below data

{
"name":"Rob",
"employeeId":"123",
"designation":"software engineer"
}

collection 2 has below data

{
"employeeId":"123",
"hobby":"painting"
}

In solr I want to populate this as

{
"employeeId":"123",
"hobby":"painting",
"name":"Rob"
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source