Need to implement Article search along with product search in PLP

Hi ,
I want to implement to show both article and product results in the search page when we search <keyword/term> in the search box. Currently product search is working fine.
Can you please suggest me how to do this?

Thanks,
Ram

Hi Ram,

Product data is searched from the non-JCR backend (e.g, brSM, or commerce backends such as commercetools or elasticpath) whereas content document are searched from JCR.
And we don’t have any built-in solution to make single search query against both JCR and external backend.
So, one option would be to add a custom command which searches documents from JCR and sets some attributes, and you can customize the rendering template to show the results together somehow.

Regards,

Woonsan

Thanks for reply. Yes and Can we use EssentialsSearchComponent as a command because already this(documentypes search) was implemented . And also I have created searchCommand which extends AbstractStarterStoreCommand and try to get documents from JCR. Command bean is triggering but results are empty. Please share if you have any suggestions.

Thanks,
Ram

com.bloomreach.commercedxp.starterstore.commands.AbstractStarterStoreCommand is different from HstComponent, only used in BR Accelerator (“StarterStore”), so you can’t use the EssentialsSearchComponent without converting its logic into a new AbstractStarterStoreCommand implementation.

Then I think you should debug why the result - I guess you mean the HstQueryResult right? - is empty.

Regards,

Woonsan