porting trends panel from elasticsearch to solr

Review my changes and If there is any problem please tell me