Overwriting the default search SQL-Query

Hello,

I am currently developing a plugin for overwriting the existing Shopware Search functionality but could not find any documentation about my needs.

What I exactly want to do?

  • I want to overwrite/re-write the SQL Query for the regular search page in the Shopware with my custom Plugin.
  • I want to overwrite/re-write the Search Listing page.

What is my goal?

  • When a search term comes to the Search controller I want to get this term and then perform my own SQL Query with this term using Symfony DBAL with my own parameters and own order by, where caluses.

What I have already done?

  • I have created a Shopware 5 Plugin and installed it on dev branch. I have created a controller named Search in order to overwrite the existing official Shopware Search controller but it wasn’t possible for me to control/edit the SQL Query from that controller because as I see the whole Search Interface/Controller etc. goes far more deep into the Symfony and core Shopware classes.