Changed Solr to standard SQL statements
Now optimized single query to get relevant images based on caption