How can I search incomplete name of attributes?

hi
I have some attributes with a common section like , productDescription, warrantyDescription, collectionDescripion …
how can I search all of these attributes ? I want to know how many field have “Description” in their name…

I would fire up Compass and run Analyse Schema from the Schema tab.

See Analyze Your Data Schema.

If that is not satisfying. My approach would be:

  • a $project stage with $objectToArray
  • an $unwind stage on the result of the above
  • a $match stage with a $regex to keep /Description/
  • a $group stage with a $sum or $first
1 Like

Hi @nahid_musavi, could you please follow up on this. If my post help you achieve your goal, please let us know and mark my post as the solution. This is as courtesy to all to make this forum efficient and helpful.