Added facet support to the percolate api.
Closes #3851
Fix markup
externalize writing "raw" fields to helper method