changed the logic for getting facet fields