@Override
public void handle(Request request, Response response) {
RuleQuery query = createRuleQuery(ruleService.newRuleQuery(), request);
SearchOptions searchOptions = SearchOptions.create(request);
QueryContext queryContext = mapping.newQueryOptions(searchOptions);
<BUG>if (Boolean.valueOf(request.paramAsBoolean("facets"))) {

queryContext.addFacets(Arrays.asList("languages", "repositories", "tags"));</BUG>
}
Result<Rule> results = ruleService.search(query, queryContext);

@Override
public void handle(Request request, Response response) {
RuleQuery query = createRuleQuery(ruleService.newRuleQuery(), request);
SearchOptions searchOptions = SearchOptions.create(request);
QueryContext queryContext = mapping.newQueryOptions(searchOptions);
Boolean facets = request.paramAsBoolean("facets");
if (facets != null && facets) {
queryContext.addFacets(Arrays.asList("languages", "repositories", "tags"));
}
Result<Rule> results = ruleService.search(query, queryContext);
