connect apache solr to a custom search function
You dont need a module for this. Activate your solr module, index your content and the core drupal search will be replaced by the solr search. 
There is nothing else you need to do. From then on, every search you make using the domain.com/search/site url will be automatically directed to solr.

It is just a matter of setting the right options in the solr module.