- 设置collation
Collation collation = Collation.of(Locale.CHINESE)
.numericOrdering(true);
- 设置聚合选项
Aggregation aggregation = Aggregation.newAggregation(
Aggregation.match(orOperator),
).withOptions(AggregationOptions.builder()
.collation(collation)
.build());
标签:聚合,mongo,Collation,Aggregation,collation,字符串,排序
From: https://www.cnblogs.com/lijiale/p/17481248.html