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") 
Posted by Sergey at 16:43 0 comments
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: mongodb, spring, springdata
Newer Posts Older Posts Home
View mobile version
Subscribe to: Posts (Atom)

Search This Blog

About Me

Sergey
View my complete profile
View Sergey Safonov's profile on LinkedIn

Subscribe To

Posts
Atom
Posts
All Comments
Atom
All Comments

Labels

  • java (25)
  • libraries (19)
  • performance (17)
  • android (15)
  • spring (14)
  • other (13)
  • database (8)
  • javaee (7)
  • hibernate (6)
  • tomcat (6)
  • architecture (5)
  • javascript (4)
  • books (3)
  • api (2)
  • concurrency (2)

Blog Archive

  • ►  2022 (1)
    • ►  December (1)
  • ▼  2020 (5)
    • ►  September (1)
    • ►  June (1)
    • ►  April (2)
    • ▼  March (1)
      • Spring Data and MongoDb aggregation examples
  • ►  2019 (4)
    • ►  October (3)
    • ►  March (1)
  • ►  2018 (3)
    • ►  August (1)
    • ►  June (1)
    • ►  March (1)
  • ►  2017 (11)
    • ►  September (1)
    • ►  July (1)
    • ►  June (3)
    • ►  March (2)
    • ►  February (3)
    • ►  January (1)
  • ►  2016 (12)
    • ►  December (1)
    • ►  November (1)
    • ►  October (1)
    • ►  September (4)
    • ►  August (1)
    • ►  June (1)
    • ►  May (1)
    • ►  February (2)
  • ►  2015 (9)
    • ►  December (1)
    • ►  November (2)
    • ►  October (1)
    • ►  May (1)
    • ►  March (2)
    • ►  January (2)
  • ►  2014 (5)
    • ►  November (1)
    • ►  October (2)
    • ►  May (1)
    • ►  January (1)
  • ►  2013 (11)
    • ►  December (1)
    • ►  October (2)
    • ►  July (2)
    • ►  June (2)
    • ►  April (2)
    • ►  March (1)
    • ►  January (1)
  • ►  2012 (14)
    • ►  December (1)
    • ►  November (2)
    • ►  September (1)
    • ►  August (2)
    • ►  July (2)
    • ►  June (2)
    • ►  April (1)
    • ►  March (1)
    • ►  February (2)
  • ►  2011 (17)
    • ►  December (1)
    • ►  November (1)
    • ►  September (4)
    • ►  August (1)
    • ►  July (1)
    • ►  May (2)
    • ►  April (2)
    • ►  March (1)
    • ►  February (1)
    • ►  January (3)
  • ►  2010 (18)
    • ►  December (6)
    • ►  November (2)
    • ►  October (7)
    • ►  September (3)

Geography

30 days page views

Popular Posts

  • A different object with the same identifier value was already associated with the session
    Hibernate Error: org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the ...
  • Horizontal scrollbars at top & bottom in Datatables
    In my data table I have a lot of data so horizontal scroll is required. I found library jQuery-doubleScroll but it doesn't work with D...
  • Migrating a project from Java 11 to Java 17
    Java 17 is new LTS version and it make sense to migrate existing projects to the new version. I will describe my specific case
  • Scrum in few words
    Note about scrum. It is mostly based on Scum Guide but in much shorter way and with some examples from my experience.
  • Use HttpClient in Multithreaded Environment
    Basic recommendations
  • Generate settings-security.xml file for maven password encryption
      mvn --encrypt-master-password   does not create a file   security-settings.xml .  Use the command  mvn --encrypt-master-password  to gener...
  • Auto Generate Database(ER) Diagram MySql
    To create ER diagram from db schema you can use SchemaSpy.
  • JavaEE: Building web project using Ant
    Ant is a great tool for building your projects. In this example I'll create simple jar (of course you can create war and ear archives in...
  • Configuring VisualVM with tomcat + linux
    VisualVM is a tool that provides a visual interface for viewing detailed information about Java applications while they are running on a J...
  • JavaEE: Using @EJB annotation
    Shows use of @EJB in a Stateless to have another Stateless bean injected into it.Using Jboss 5 + Seam framework
Awesome Inc. theme. Powered by Blogger.