Searching for nested attributes is not supported by default in SAP Commerce (Hybris) when using the Backoffice advanced search. If you are required to implement such a feature, the two options would be:
1) Extend the advanced search logic (see AdvancedSearchController class)
- Not recommended due to its complexity.
- Your particular change is item-type specific rather than a general improvement, making the effort less worthwhile.
2) Add a productCode attribute to CustomerReview and use a PrepareInterceptor.
- This is the simpler and more practical solution for your use case.
- The interceptor ensures that when the product changes in a CustomerReview, the productCode is updated accordingly.
- You can then use the productCode attribute in the advanced search widget.