Fixes to Facet Search

Added JSON facet search, make it possible to do JSON facet search without additional queries.