As we all know, Magento doesn't support route queries for catalog search URLs. This is fine, but this is limiting the URL rewrite rules.
In M1 or in M2 Luma, these URLs rewrite for catalog search work as expected.
For example
www.example.com/catalogsearch/result/?q=speaker
This URL I have added a rewrite so that customers should be taken to www.example.com/category/speaker