I am trying to sort my result with the case insensitive option. So here is my code:
List<AggregationOperation> operations = new ArrayList<>();
Sort.Order sort = ....ignoreCase();
operations.add(new SortOperation(new Sort(sort)));
But when I execute my query using an aggregation, it doesn't work:
mongoOperations.aggregate(Aggregation.newAggregation(operations).withOptions(aggregationOptions)
I displayed the query in the debug console and the ignoreCase totally disappeared in the aggregation:
db.getCollection('persons').aggregate([
{
"$sort":{
"buyer.organization.name":-1
}
}
])
How can I put the ignore case option in my aggregation?
Thanks for your help!