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 …
-
The Cost of Not Knowing MongoDB – Part 3: (appV6R0 to appV6R4)
Table of Contents Application version 6 revision 0 (appV6R0): A dynamic monthly bucket documentSchemaBulk upsertGet reportsIndexesInitial scenario statisticsLoad test resultsIssues and improvementsApplication version 6 revision 1 (appV6R1): A dynamic quarter bucket documentSchemaBulk upsertGet reportsIndexesInitial scenario statisticsLoad test resultsIssues and improvementsApplication …
-
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 …
-
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 …
-
The Pitfall of Increasing Read Capacity by Reading From Secondary Nodes in a MongoDB Replica Set
Table of Contents The scenarioA solution from AI ModelsThe pitfall of scaling capacity by reading from secondary nodesIncreasing read capacity vs increasing read performanceProperly increasing read capacityVertical scaling (scale up)Horizontal scaling (scale out via sharding)Maybe other ways around it?Read-only nodeAnalytics …
-
How MongoDB Decides What to Forget?
Table of Contents Scan → Score → Hazard Check → Write (if dirty) → Evict → Adjust Metrics Inside MongoDB’s storage engine, WiredTiger, nothing happens by accident. Every page in memory exists under policy — governed, measured, and continuously evaluated against …
-
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 …
-
The Cost of Not Knowing MongoDB – Part 2 (appV5R0 to appV5R4)
Table of Contents Application Version 5 Revision 0 and Revision 1 (appV5R0 and appV5R1): A simple way to use the Bucket PatternSchemaBulk upsertGet reportsIndexesScenarioLoad tests resultsIssues and improvementsApplication Version 5 Revision 2 (appV5R2): Using the Bucket Pattern with the Computed …
-
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 …
-
The Cost of Not Knowing MongoDB – Part 1: appV0 to appV4
Table of Contents The application: finding fraudulent behavior in transactionsThe load testInitial scenario and data generatorThe instances configurationApplication Version 1 (appV1)SchemaBulk upsertGet reportsIndexesInitial scenario statsLoad test resultsIssues and improvementsApplication Version 2 (appV2)SchemaBulk upsertGet reportsIndexesInitial scenario statsLoad tests resultsIssues and improvementsApplication …
-
Keywords Meet Vectors: Hybrid Search on MongoDB
Table of Contents What is hybrid search?How does it work in MongoDB?Why movies collection are the perfect demoInspecting the anchor documentSanity checksStep 1: Prepare the query vectorStep 2: Run semantic searchStep 3: Apply hybrid scoringStep 4: Hybrid ranking with Reciprocal …