小象学院 计算机视觉项目实战
2022-12-07 14:20 作者:bili_1559000721 | 我要投稿
前缀模糊
public static MatchOperation matchStartWith(String field, String value) {
Pattern compile = Pattern.compile("^" + Pattern.quote(value), Pattern.CASE_INSENSITIVE);
return Aggregation.match(Criteria.where(field).regex(compile));}