<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Opensolr Hybrid Vector Search]]></title><description><![CDATA[Opensolr Hybrid Vector Search]]></description><link>https://opensolr.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Mon, 12 Oct 2026 04:52:19 GMT</lastBuildDate><atom:link href="https://opensolr.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Hybrid Search in Apache Solr is NOW Production-Ready (with 1024D vectors!)]]></title><description><![CDATA[# Follow-up: Hybrid Search in Apache Solr is NOW Production-Ready (with 1024D vectors!)
Hey everyone,
A few days back I shared my experiments with hybrid search (combining traditional lexical search with vector/semantic search). Well, I've been busy,...]]></description><link>https://opensolr.hashnode.dev/hybrid-search-in-apache-solr-is-now-production-ready-with-1024d-vectors</link><guid isPermaLink="true">https://opensolr.hashnode.dev/hybrid-search-in-apache-solr-is-now-production-ready-with-1024d-vectors</guid><category><![CDATA[Solr,hybrid search,Solr search,]]></category><category><![CDATA[Llm Embedding]]></category><category><![CDATA[Opensolr]]></category><category><![CDATA[apache solr]]></category><category><![CDATA[llm]]></category><category><![CDATA[vector database]]></category><category><![CDATA[VectorSearch]]></category><category><![CDATA[lucene]]></category><category><![CDATA[Solr]]></category><dc:creator><![CDATA[Chip Ryan]]></dc:creator><pubDate>Tue, 09 Dec 2025 13:30:02 GMT</pubDate><content:encoded><![CDATA[<p># Follow-up: Hybrid Search in Apache Solr is NOW Production-Ready (with 1024D vectors!)</p>
<p>Hey everyone,</p>
<p>A few days back I shared my experiments with hybrid search (combining traditional lexical search with vector/semantic search). Well, I've been busy, and I'm back with some **major upgrades** that I think you'll find interesting.</p>
<p>**TL;DR:** We now have 1024-dimensional embeddings, blazing fast GPU inference, and you can generate embeddings via our free API endpoint. Plus: you can literally search with emojis now. Yes, really. 🚲 finds bicycles. 🐕 finds dog jewelry. Keep reading.</p>
<p>---</p>
<p>## What Changed?</p>
<p>### 1. Upgraded from 384D to 1024D Embeddings</p>
<p>We switched from `paraphrase-multilingual-MiniLM-L12-v2` (384 dimensions) to `BAAI/bge-m3` (1024 dimensions).</p>
<p>**Why does this matter?**</p>
<p>Think of dimensions like pixels in an image. A 384-pixel image is blurry. A 1024-pixel image is crisp. More dimensions = the model can capture more nuance and meaning from your text.</p>
<p>The practical result? Searches that "kind of worked" before now work **really well**, especially for:</p>
<p>- Non-English languages (Romanian, German, French, etc.)</p>
<p>- Domain-specific terminology</p>
<p>- Conceptual/semantic queries</p>
<p>### 2. Moved Embeddings to GPU</p>
<p>Before: CPU embeddings taking 50-100ms per query. Now: GPU embeddings taking ~2-5ms per query.</p>
<p>The embedding is so fast now that even with a network round-trip from Europe to USA and back, it's **still faster** than local CPU embedding was. Let that sink in.</p>
<p>### 3. Optimized the Hybrid Formula</p>
<p>After a lot of trial and error, we settled on this normalization approach:</p>
<p>```</p>
<p>score = vector_score + (lexical_score / (lexical_score + k))</p>
<p>```</p>
<p>Where `k` is a tuning parameter (we use k=10). This gives you:</p>
<p>- Lexical score normalized to 0-1 range</p>
<p>- Vector and lexical scores that play nice together</p>
<p>- No division by zero issues</p>
<p>- Intuitive tuning (k = the score at which you get 0.5)</p>
<p>### 4. Quality Filter with frange</p>
<p>Here's a pro tip: use Solr's `frange` to filter out garbage vector matches:</p>
<p>```</p>
<p>fq={!frange l=0.3}query($vectorQuery)</p>
<p>```</p>
<p>This says "only show me documents where the vector similarity is at least 0.3". Anything below that is typically noise anyway. This keeps your results clean and your users happy.</p>
<p>---</p>
<p>## Live Demos (Try These!)</p>
<p>I've set up several demo indexes. **Each one has a Debug button in the bottom-right corner** - click it to see the exact Solr query parameters and full `debugQuery` analysis. Great for learning!</p>
<p>### 🛠️ Romanian Hardware Store (Dedeman)</p>
<p>Search a Romanian e-commerce site with emojis:</p>
<p>[🚲 → Bicycle accessories](https://opensolr.com/search/dedeman?topbar=block&amp;q=%F0%9F%9A%B2&amp;in=web&amp;og=yes&amp;locale=&amp;duration=&amp;source=&amp;fresh=no&amp;lang=)</p>
<p>No keywords. Just an emoji. And it finds bicycle mirrors, phone holders for bikes, etc. The vector model understands that 🚲 = bicicletă = bicycle-related products.</p>
<p>### 💎 English Jewelry Store (Rueb.co.uk)</p>
<p>Sterling silver, gold, gemstones - searched semantically:</p>
<p>[🐕 → Dog-themed jewelry](https://opensolr.com/search/rueb?topbar=block&amp;q=%F0%9F%90%95&amp;in=web&amp;og=yes&amp;locale=&amp;duration=&amp;source=&amp;fresh=no&amp;lang=)</p>
<p>[⭐️ → Star-themed jewelry](https://opensolr.com/search/rueb?topbar=block&amp;q=%E2%AD%90%EF%B8%8F&amp;in=web&amp;og=yes&amp;locale=&amp;duration=&amp;source=&amp;fresh=no&amp;lang=)</p>
<p>### 🧣 Luxury Cashmere Accessories (Peilishop)</p>
<p>Hats, scarves, ponchos:</p>
<p>[winter hat → Beanies, caps, cold weather gear](https://opensolr.com/search/peilishop?topbar=block&amp;q=winter+hat&amp;in=web&amp;og=yes&amp;locale=&amp;duration=&amp;source=&amp;fresh=no&amp;lang=)</p>
<p>### 📰 Fresh News Index</p>
<p>Real-time crawled news, searchable semantically:</p>
<p>[🍳 → Food/cooking articles](https://opensolr.com/search/vector?topbar=block&amp;q=%F0%9F%8D%B3&amp;in=web&amp;og=yes&amp;locale=&amp;duration=&amp;source=&amp;fresh=no&amp;lang=)</p>
<p>[what do we have to eat to boost health? → Nutrition articles](https://opensolr.com/search/vector?topbar=block&amp;q=what+do+we+have+to+eat+to+boost+health%3F&amp;in=web&amp;og=yes&amp;locale=&amp;duration=&amp;source=&amp;fresh=no&amp;lang=)</p>
<p>This last one is pure semantic search - there's no keyword "boost" or "health" necessarily in the results, but the *meaning* matches.</p>
<p>---</p>
<p>## Free API Endpoint for 1024D Embeddings</p>
<p>Want to try this in your own Solr setup? We're exposing our embedding endpoint for free:</p>
<p>```bash</p>
<p>curl -X POST https://opensolr.com/api/embed \</p>
<p>-H "Content-Type: application/json" \</p>
<p>-d '{"text": "your text here"}'</p>
<p>```</p>
<p>Returns a 1024-dimensional vector ready to index in Solr.</p>
<p>**Schema setup:**</p>
<p>```xml</p>
<p>&lt;fieldType name="knn_vector" class="solr.DenseVectorField"</p>
<p>vectorDimension="1024" similarityFunction="cosine"/&gt;</p>
<p>&lt;field name="embeddings" type="knn_vector" indexed="true" stored="false"/&gt;</p>
<p>```</p>
<p>---</p>
<p>## Key Learnings</p>
<p>1. **Title repetition trick**: For smaller embedding models, repeat the title 3x in your embedding text. This focuses the model's limited capacity on the most important content. Game changer for product search.</p>
<p>2. **topK isn't "how many results"**: It's "how many documents the vector search considers". The rest get score=0 for the vector component. Keep it reasonable (100-500) to avoid noise.</p>
<p>3. **Lexical search is still king for keywords**: Hybrid means vector helps when lexical fails (emojis, conceptual queries), and lexical helps when you need exact matches. Best of both worlds.</p>
<p>4. **Use synonyms for domain-specific gaps**: Even the best embedding model doesn't know that "autofiletantă" (Romanian) = "drill". A simple synonym file fixes what AI can't.</p>
<p>5. **Quality &gt; Quantity**: Better to return 10 excellent results than 100 mediocre ones. Use `frange` and reasonable `topK` values.</p>
<p>---</p>
<p>## What's Next?</p>
<p>Still exploring:</p>
<p>- Fine-tuning embedding models for specific domains</p>
<p>- RRF (Reciprocal Rank Fusion) as an alternative to score-based hybrid</p>
<p>- More aggressive caching strategies</p>
<p>Happy to answer questions. And seriously, click that Debug button on the demos - seeing the actual Solr queries</p>
<p>is super educational!</p>
<p>---</p>
<p>*Running Apache Solr 9.x on [OpenSolr.com](https://opensolr.com/) - free hosted Solr with vector search support.*</p>
]]></content:encoded></item></channel></rss>