fix 'Too many clauses in Solr query' error
move JSP tags outside of the javascript rendering block
fix bugs from 5374d801ee73f023d4f1c6d24b6c0231e94e98d9