return boolQuery;
}
}
private QueryBuilder boost(QueryBuilder query) {
FunctionScoreQueryBuilder booster = functionScoreQuery(query);
booster.add(termFilter("is_comment", "false"), ScoreFunctionBuilders.factorFunction(TOPIC_BOOST));
booster.add(rangeFilter("postdate").gte("now/d-3y"), ScoreFunctionBuilders.factorFunction(RECENT_BOOST));
return booster;
}