private QueryResultWrapper doQuery(JCRSessionWrapper session, final String... facet) throws RepositoryException {
QueryObjectModelFactory factory = session.getWorkspace().getQueryManager().getQOMFactory();
QOMBuilder qomBuilder = new QOMBuilder(factory, session.getValueFactory());
qomBuilder.setSource(factory.selector("jnt:event", "event"));
qomBuilder.andConstraint(factory.descendantNode("event", "/sites/jcrFacetTest"));
for (int j = 0; j < facet.length; j++) {
String prop = facet[j++];
String val = facet[j];
if (prop.startsWith("rep:filter(")) {
qomBuilder.andConstraint(factory.fullTextSearch("event", "rep:filter("