Fix solr env id, support real world environment.

Minor fix for #5580