* @param crit
* @return query
* @throws UnsupportedSearchException
*/
private Query createModSeqQuery(SearchQuery.ModSeqCriterion crit) throws UnsupportedSearchException {
NumericOperator op = crit.getOperator();
switch (op.getType()) {
case EQUALS:
return NumericRangeQuery.newLongRange(MODSEQ_FIELD, op.getValue(), op.getValue(), true, true);
case GREATER_THAN:
return NumericRangeQuery.newLongRange(MODSEQ_FIELD, op.getValue(), Long.MAX_VALUE, false, true);
case LESS_THAN:
return NumericRangeQuery.newLongRange(MODSEQ_FIELD, Long.MIN_VALUE, op.getValue(), true, false);
default:
throw new UnsupportedSearchException();
}
}