Programming notes

about java, spring, android, app performance and architecture

Sunday, 29 March 2020

Spring Data and MongoDb aggregation examples

I've faced recently with some not trivial mongo aggregation queries and found there are not so many examples available, so main source is official docs https://docs.spring.io/spring-data/mongodb/docs/current/reference/html/#introduction

also was useful tests of the Spring Framework:

https://github.com/spring-projects/spring-data-mongodb/blob/master/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/aggregation/AggregationTests.java

https://github.com/spring-projects/spring-data-mongodb/blob/master/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/aggregation/ProjectionOperationUnitTests.java

use to profile query
db.events.explain("executionStats").aggregate("query") 
Sergey at 16:43 No comments:
Share
‹
›
Home
View web version

About Me

Sergey
View my complete profile
Powered by Blogger.