how to retrieve data for apache solr
Use Apache Solr Multisite search https://www.drupal.org/project/apachesolr_multisitesearch This is the proper way to have multiple sites sharing one index. You can search all sites or single sites.