change id to pkg_id in db_solr_sync
simplify log message in db_solr_sync
get result into a set
use package_show instead of incorrect sql