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
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
  • JavaEE : Hibernate tutorial
    Hibernate is an object-relational mapping (ORM) library for the Java language, providing a framework for mapping an object-oriented domain ...
  • 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...
  • 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
  • Approximate string matching algorithm (fuzzy search)
    This is a great algorithm to find similarity coefficient of the two words. Author is Viterbi or Bellman.I didn't find anything about ...
  • Simple example of Google Analytics API usage
    Publishing my old note, of how to use Google Analytics Core Reporting API (v2)
  • Android: Android Packaging Problem
    Strange error: "Conversion to Dalvik format failed with error 1 MyApplication Unknown Android Packaging Problem " Solution: Menu...
Awesome Inc. theme. Powered by Blogger.