Adding ability to set connection on search

Also adding the ability to override default connection in the
configuration