filters.add(new PwaDateClosestFilter(reader, query.getText()));
scoreType=ScoreType.ONLY_ONE; // only one result, so it does not need to rank
}
else if (clause.getQuery() instanceof RangeQuery) { // add filter - date range
RangeQuery query = (RangeQuery)clause.getQuery();
filters.add(new PwaDateRangeFilter(reader, query.getLowerTerm().text(), query.getUpperTerm().text()));
}
else if (clause.getQuery() instanceof PwaSortQuery) { // add filter - sort results by date
PwaSortQuery query = (PwaSortQuery)clause.getQuery();
if (query.getField().equals("date")) { // it does not need to rank by score, because results are sorted by date
if (query.getReverse()) {