Thanks for the quick response Marcus.
I also felt the design in similar line.
If I create a single collection for search from base collections, I will end up having another collection which may occupy more storage and additional billing.
Alternative is to go with external reference pattern for child document collection (One collection with external reference document (Search Attributes) to base document collection. In this way, I would having similar code logic to Approach 1(Single collection for Search) for keeping external reference document up to date with base collection document. But this will not introduce additional collection for Search functionality. But there would be impact to CRUD operations as $merge need to be performed for multiple documents(even if one attribute of base document gets changed - in case a base document is referred in 20K Child documents).
What will be the performance impact of REALM trigger and $merge as we will create a trigger for - INSERT, UPDATE and DELETE scenarios?
Depending on above scenarios, what would be your recommendation? We may have 25M records each in both Child document and base document collections.