Skip to main content

Uncategorized

Full-Text Search with Spring Data Elasticsearch on Spring Boot 4

Spring Data Elasticsearch's ElasticsearchRepository looks exactly like JpaRepository — derived query methods, @Id, the same muscle memory. That similarity hides the one decision that actually matters in Elasticsearch: how each field is mapped. Map a field "text" and it's tokenized, stemmed and fuzzy-matchable; map it "keyword" and it's an exact, unanalyzed string good for filtering, sorting and aggregating. Pick wrong and nothing throws an error — the field just quietly stops doing what you expect. This post builds a small product-search service on Spring Boot 4.1 and Elasticsearch 9.4 — a repository for the simple lookups, and the query DSL for everything a repository method can't express: multi-field relevance scoring with per-field boosting, typo-tolerant fuzzy matching, a price filter that narrows results without touching their rank, and a terms aggregation for category facet counts. Versions used in this post. Spring Boot 4.1.1 · Spring Data Elasticsearch 6.1.1 · elasticsearch-java client 9.4.5 · Elasticsearch server 9.4.8 · JDK 25 (Temurin) · Testcontainers 2.0.5 (testcontainers-elasticsearch). The server version is pinned to match the client's minor version — confirmed via mvn dependency:tree rather than assumed, after discovering elsewhere in this series that a mismatched tag can be silently broken upstream.

Spring Boot 4 with MongoDB: Transactions, Aggregations and Indexes That Actually Work

Spring Data MongoDB makes a document database feel so much like a relational one — repositories, derived query methods, @Id — that it's easy to forget the two places where the resemblance stops being helpful: transactions and indexes. Both are opt-in, both fail silently when you skip them, and both are exactly the kind of thing a tutorial glosses over because the happy path doesn't need them. This post builds a small order-placement service on Spring Boot 4.1 and MongoDB 9.0 — repositories for the simple lookups, an aggregation pipeline for a report no repository method can express, a multi-document transaction across two collections, and a compound index whose absence is provable with explain(), not just asserted in prose. Versions used in this post. Spring Boot 4.1.1 · Spring Data MongoDB (via spring-data-bom 2026.0.1) · MongoDB Java driver 5.8.1 · MongoDB server 9.0.2 · JDK 25 (Temurin) · Testcontainers 2.0.5 (testcontainers-mongodb). Run against a single-node MongoDB replica set in Docker — Testcontainers' MongoDBContainer configures replica-set mode automatically on this version; there is no .withReplicaSet() call to make, unlike what older tutorials show.

Time-Series Data in Java: QuestDB vs InfluxDB vs TimescaleDB

The same 100,000-row sensor workload, ingested and downsampled identically on QuestDB, InfluxDB 3 Core, and TimescaleDB — with real benchmark numbers and a real Arrow Flight / Netty bug in the official InfluxDB 3 Java client, reproduced and fixed.

Java on the GPU with TornadoVM 7: When It Beats the Vector API

How TornadoVM 7.2.0 task graphs and @Parallel loops work, with a measured plain-Java versus Vector API matrix-multiply baseline (up to 43x over the naive loop). Honest about the gap: the TornadoVM code compiles but could not be run without a GPU, so there are no TornadoVM timings.

Background Jobs in Spring Boot 4 with JobRunr 9

Fire-and-forget, scheduled and recurring jobs with retries, a dashboard and durable steps, run on JobRunr 9.0.1 and Spring Boot 4.1.1. Leads with the three ways it fails to start, shows a job surviving a restart, and compares it honestly with @Async and @Scheduled.

Google ADK for Java: Your First Multi-Agent App

Build two agents that hand work to each other with Google's Agent Development Kit for Java 1.11.0: an LlmAgent with a tool, a SequentialAgent, and session state as the hand-off. Runs without an API key, using a scripted stand-in model that is labelled as such.