Added solr-compatible json, and fixed some issues