Updated with better solution in newer Search API Solr versions.