Ricardo Mello9 articles
Table of Contents One search might not be enoughMerging the best of both worldsPrerequisitesThe vector searchThe full-text searchImplementing the full-text indexExecuting a basic text queryImproving the experience with fuzzy searchRefining results with score boostingCombining forces with hybrid searchThe $rankFusionHow to …
-
Modeling Relationships With Hibernate ORM and MongoDB
Table of Contents PrerequisitesOne-to-many relationshipApproach 1: Embedding reviews inside booksApproach 2: Moving reviews to a separate collectionApproach 3: Bringing back recent reviews (Subset Pattern)Implementing the Subset PatternTesting the featureWrapping up In the previous article—Getting Started With Hibernate ORM and MongoDB—we …
November 04, 2025 -
Getting Started With Hibernate ORM and MongoDB
Table of Contents How MongoDB fits inPrerequisitesTag your Atlas clusterProject overviewSetting up the projectConfigure HibernateThe Book entityCreating the SessionFactoryImplementing the Book serviceRunning the applicationCurrent limitations (Public Preview)Wrapping up For years, Hibernate ORM has been one of the most popular frameworks …
November 04, 2025 -
Beyond Keywords: Optimizing Vector Search With Filters and Caching (Part 2)
Table of Contents Adding filters: From story to codeFirst try: Add a post-filter in MovieServiceSecond try: Use a pre-filterRefining the search with extra filtersApplying toCriteria() in the searchReducing embedding costs with cachingStrategy with @CacheableA minimal frontendStep 1: HTMLStep 2: JavaScriptStep …
October 23, 2025 -
Beyond Keywords: Implementing Semantic Search in Java With Spring Data (Part 1)
Table of Contents The magic behind vector searchPrerequisitesEmbeddings with Voyage AIPreparing the datasetMongoDB Atlas Vector Search (index and retrieval)Building the movie search appConfiguring the applicationThe document modelWire the request DTOCommunicating with Voyage AIThe EmbeddingServiceQuerying with Spring Data Vector Search operationThe …
-
Queryable Encryption With Spring Data MongoDB: How to Query Encrypted Fields
Table of Contents Why Queryable Encryption?A quick look at Spring Data MongoDBUse case: HR system with encrypted fieldsSetting up the projectConfiguring dependencies and propertiesAdding mongodb-cryptApplication.yml configurationAccessing properties in the codeBuilding the application layersThe domain modelThe repositoryThe serviceThe controllerSetting up encryptionConfiguring …
September 02, 2025 -
Why Mirroring Production in Dev Helps You Avoid Costly Mistakes
Table of Contents The setup: A realistic aggregation scenarioThe application behind the testTesting on M0: The hidden riskTaking it to production: Same query, different outcomeReal-time metrics: Detecting the bottleneckQuery insights: The detective toolDon’t guess, let Performance Advisor show the wayResilience …
July 28, 2025 -
Clean and Modular Java: A Hexagonal Architecture Approach
One of the discussions that always leaves me with both doubts and excitement is the one about system architecture. Ever since I started diving deeper into programming, I’ve encountered questions like how to separate packages and modules: is it really …
-
MongoDB Aggregation Framework: A Beginner’s Guide
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. …