Table of Contents Aggregation pipelineAggregation stages$Match$Project$Unwind$Group$Sort$AddFieldsCombining stagesWrapping up Finding exactly the data we need isn’t always a simple task. You’ve probably faced situations where you needed to filter information, group it, and even perform calculations to produce a final result. …
-
Testing MongoDB Atlas Search Java Apps Using TestContainers
Table of Contents What is MongoDB Atlas Search, anyway?Local development and testing with MongoDB Atlas SearchWhat’s TestContainers?Let’s write some code!Simple CRUD data access and unit testsMongoDB Atlas Search with seed data and index waitAdvanced seed data loading: MongoDB Database ToolsLoading …
-
Understanding BSON: A Beginner’s Guide to MongoDB’s Data Format
Table of Contents What is BSON?Why not just JSON?BSON vs. JSONCommon BSON data types (and their Java equivalents)BSON and MongoDB internalsSetup and project structureBSON data types and document creationNested fields and arraysWhy use nested structures?Raw BSON manipulationQuerying with BSONAggregation with …
-
Building a Real-Time AI Fraud Detection System with Spring Kafka and MongoDB
Table of Contents What we are buildingPrerequisitesCreate our MongoDB databaseCreate a Vector Search indexCreate a Spring applicationSetting up configurationMongoDB configurationSpring AI configurationKafka configurationGenerate our synthetic customer profilesThe customer modelCustomer seedingHow the sample customers are structuredThe transaction modelGenerating random transactionsHow do …