Enterprise search needs vectors and business filters in one query. Spring Boot 4, LangChain4j QdrantEmbeddingStore, local embeddings, and metadataKey filters.
Enterprise applications seldom rely solely on similarity for information retrieval. An e-commerce catalog has to recommend products that match what the customer meant, and that are still in the right category, under a price ceiling. A document desk has to find related pages, and only the ones that role can open. If you only rank by vector distance, you still have a second pass in Java that throws most of the top-k away. That second pass is where latency and wrong answers hide. Otavio Santana's DZone piece (20 Nov 2026) makes the same point with Qdrant and Java. My path here is Spring Boot 4.2 and LangChain4j 1.24 , without Spring AI: a local embedder, QdrantEmbeddingStore , and a metadata filter on the search request. A point is an id, a vector, and a payload Qdrant is an open-source vector database written in Rust. The unit of storage is a point : an identifier, one or more vector representations, and an optional JSON payload. That payload is the enterprise part. Product type, price, availability, tenant. Qdrant can index it and evaluate it during the similarity query. You do not have to pull every quiet seaside hotel and then drop the ones outside the budget in application code. Dense vectors, sparse vectors, named multi-vectors, hybrid retrieval, and quantization are available when you need them. None of that replaces a clear rule: the constraints that already exist in your domain belong on the query. Tripadvisor, HubSpot, Dailymotion, and OpenTable show up in Qdrant's public customer stories. That list is proof of range, not a reason to add a vector database when your current store already answers the job. Start Qdrant with Docker For a local lab, one container is enough: docker run --name qdrant-instance \ -p 6333:6333 -p 6334:6334 \ -d qdrant/qdrant Port 6333 is HTTP and the dashboard. Port 6334 is gRPC. LangChain4j's Qdrant store talks gRPC. Open http://localhost:6333/dashboard and confirm the instance is up before you wire Spring. Spring Boot 4 wires LangChain4j. It does not embed for you. Pin Spring Boot 4.2.0 . Add LangChain4j's Qdrant store and a local ONNX embedding model so the first demo does not need an API key: <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>4.2.0</version> </parent> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> </dependency> <dependency> <groupId>dev.langchain4j</groupId> <artifactId>langchain4j-qdrant</artifactId> <version>1.24.0-beta34</version> </dependency> <dependency> <groupId>dev.langchain4j</groupId> <artifactId>langchain4j-embeddings-all-minilm-l6-v2-q</artifactId> <version>1.24.0-beta34</version> </dependency> </dependencies> langchain4j-qdrant is still on the beta line with the rest of the store modules. Pin it and retest when you move. Create the collection once (Cosine, 384 for all-MiniLM-L6-v2 ), then expose two beans: @Configuration public class QdrantConfig { @Bean EmbeddingModel embeddingModel() { return new AllMiniLmL6V2QuantizedEmbeddingModel(); } @Bean EmbeddingStore<TextSegment> embeddingStore() { return QdrantEmbeddingStore.builder() .host("localhost") .port(6334) .collectionName("products") .build(); } } Create the collection before the first upsert. Match size 384 and Cosine to the local model. Mismatched dimensions fail early. Mismatched spaces fail quietly with confident neighbors. QdrantClient client = new QdrantClient( QdrantGrpcClient.newBuilder("localhost", 6334, false).build()); client.createCollectionAsync( "products", VectorParams.newBuilder() .setDistance(Distance.Cosine) .setSize(384) .build()) .get(); Persist text and metadata together Embed the fields that should drive similarity. Put the fields that should drive policy in metadata. TextSegment segment = TextSegment.from( """ Product: Dog Bed Description: A comfortable sleeping cushion for pets. """, Metadata.from(Map.of( "type", "PET", "name", "Dog Bed"))); Embedding embedding = embeddingModel.embed(segment).content(); embeddingStore.add(embedding, segment); LangChain4j stores the text and metadata as the Qdrant payload. The store does not own the model. Spring only wires the two beans. Search with the vector. Then add the rule. A customer says "something comfortable for my animal to rest." Embed that sentence and ask for neighbors: Embedding query = embeddingModel.embed( "something comfortable for my animal to rest").content(); EmbeddingSearchResult<TextSegment> result = embeddingStore.search( EmbeddingSearchRequest.builder() .queryEmbedding(query) .maxResults(3) .build()); That returns semantic neighbors. Similarity still is not the product. Restrict to pet products on the same call: import static dev.langchain4j.store.embedding.filter.MetadataFilterBuilder.metadataKey; EmbeddingSearchResult<TextSegment> result = embeddingStore.search( EmbeddingSearchRequest.builder() .queryEmbedding(query) .filter(metadataKey("type").isEqualTo("PET")) .maxResults(3) .build()); QdrantEmbeddingStore maps that Filter into Qdrant's payload filter. The database evaluates it with the vector search. You do not pull top-k and discard in a stream. If you filter after the top-k, you did not search under the rule. You discarded. The next page of the catalog never got a fair chance. flowchart LR subgraph wrong["Post-filter in Java"] Q1["Query vector"] --> T1["Top-k from Qdrant"] T1 --> J["Filter type, price, tenant in Java"] J --> R1["Fewer than k results"] end subgraph right["Filter in Qdrant"] Q2["Query vector"] --> T2["EmbeddingSearchRequest + Filter"] T2 --> R2["k results that already pass the rule"] end What I would not do I would not paste the full chat into the embedding. Embed the text that should define similarity. I would not leave the collection size on a guess. Match the model. I would not post-filter tenant or type after retrieval and call it done. Put metadataKey on the request, or prove why you cannot. I would not pull in Spring AI for this path. Boot 4 plus LangChain4j is enough for the store and the filter. I would not treat Qdrant as mandatory. If Postgres plus a careful index already answers the job, keep Postgres. Takeaways A Qdrant point carries identity, vectors, and payload. Enterprise search needs all three on the query. Docker on 6333/6334 is enough to learn the shape before you talk about clusters. Spring Boot 4 wires EmbeddingModel and QdrantEmbeddingStore . LangChain4j owns the search API. .filter(metadataKey("type").isEqualTo("PET")) is the call that makes similarity a product feature. Otavio's DZone article is still the right conceptual companion. This sample is the Spring Boot 4 / LangChain4j wiring I would ship next to it. Where are you still filtering neighbors in Java after the vector call? Sources Otavio Santana, DZone (20 Nov 2026). Getting Started With Qdrant: Building Intelligent Search Applications With Java. Article LangChain4j. Qdrant embedding store, 1.24.0-beta34 . Docs LangChain4j. RAG tutorial: EmbeddingSearchRequest and Filter . Docs Qdrant. Search and filtering. Search · Filtering Spring Boot 4.2.0. Release