Avoid obtaining mapped sort multiple times for mapReduce.
Apply already mapped sort for map reduce instead of running the source document through the mapping layer again. Closes: #3960
This commit is contained in:
committed by
Christoph Strobl
parent
4f6501f140
commit
67b1fe5fbc
@@ -1687,7 +1687,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware,
|
||||
|
||||
Document mappedSort = getMappedSortObject(query, domainType);
|
||||
if (mappedSort != null && !mappedSort.isEmpty()) {
|
||||
mapReduce = mapReduce.sort(getMappedSortObject(query, domainType));
|
||||
mapReduce = mapReduce.sort(mappedSort);
|
||||
}
|
||||
|
||||
mapReduce = mapReduce
|
||||
|
||||
Reference in New Issue
Block a user