Please read Formatting code and log snippets in posts and then update your sample documents so that we can cut-n-paste them into our system and experiment potential solution to your issue.
You are right about not being able to use localField and foreignField since your LIKE %…% and your free form text of the field composition will require $regex. Regex are slower than direct comparison. In your case a simple schema change might be in order.
I would make the free form text field composition an array. Each element would become a tuple of corporate name and part percentage. So the corporate_goods collection could look like
{ id:1 ,
composition : [
{ corporate : Coca-cola , percent : 100 }
]
name_goods : ...
}
{ id:2 ,
composition : [
{ corporate : Coca-cola , percent : 59 } ,
{ corporate : Ford , percent : 41 }
]
name_goods : ...
}
...
No regex and probably can use localField,foreignField