Legacy Search Engine is the default search engine, it is sql based and uses Doctrine's database connection. So it's connections are, and should be defined in the same way as for storage engine, and no further specific configuration is needed.
It's features and performance is limited, and if you have specific search or performance needs you should rather look towards using Solr.
Configuring repository with the legacy search engine
As of 5.4.5, search can be configured independently from storage, and the following configuration example shows both the default values, and how you configure legacy as the search engine: