how to retrieve data for apache solr I am using apache solr 3.x .
Right now, I mixed the data from my two websites into one solr by mistake. I set one solr on the first website server and set another website's Apache Solr search to link to this server. I don't know they will mess up when I set this. But right now, the first website doesn't add any data into the solr, and all the data from the other website can add the data to the solr.

Is there anyway that I can retrieve each website data to make them show in the correct position?
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.