In the shift toward AI-native and intent-driven search, many teams assume they must replace Apache Solr to stay modern. Solr has supported vector search for years through features like DenseVectorField
and HNSW-based approximate nearest neighbor (ANN) search.
These capabilities are stable, battle-tested, and available today. However, in the SAP Commerce ecosystem, they remain largely untapped.
At HybrisArchitect.com, we’ve developed a production-ready semantic search solution that demonstrates how Solr, when combined with OpenAI embeddings and a flexible orchestration layer, can power intelligent, next-generation search experiences—without requiring a full search stack replacement.
Try It Live: Solr Semantic Search Demo
semanticsearch.hybrisarchitect.com/solr-semantic-search.html
Our live demo showcases Hybrid Search (Vector + Text)—a powerful approach that combines the precision of traditional Solr keyword search with the contextual awareness of vector embeddings.
How Hybrid Search Works
Hybrid Search processes each query through both Solr’s full-text engine and its vector similarity engine, then blends the results using a custom relevance scoring algorithm. This ensures precision for structured queries and flexibility for natural language inputs.
How It Works:
- Query Parsing
User input is parsed to extract structure, including categories, brands, price sensitivity, and sort intent. - Embedding Generation
The parsed query is sent to OpenAI to generate a vector embedding that captures semantic meaning and contextual signals. Embedding options beyond OpenAI exist, depending on your setup, privacy needs, or budget, you could also use, Cohere Embed and Sentence-BERT. - Dual Retrieval
- Vector Search retrieves conceptually similar results from Solr’s ANN index.
- Text Search runs traditional Solr keyword matching with stemming and boosting.
- Custom Ranking
Results from both sources are merged and scored using a configurable ranking formula that balances keyword match strength with semantic similarity. - Business-Aware Filtering and Sorting
Post-retrieval logic applies business filters (e.g., price, category, brand) and supports dynamic sorting by name, price, or intent-aligned relevance.
Example use cases:
- cameras for peple on budgets
- affordable tripod for content creators
- digital cameras under $100
Why Enhance Solr Instead of Replacing It
Strategic Fit for SAP Commerce
Solr remains tightly integrated with SAP Commerce Cloud’s search layer:
- Boosting, ranking, and faceting are already wired into storefront behavior
- Operationalized infrastructure is often already governed and scaled
- Custom indexing pipelines are well-understood and extensible
Replacing Solr introduces cost, complexity, and operational risk. A hybrid enhancement allows for:
- Controlled rollout of AI capabilities
- A/B testing of search relevance
- Preservation of critical business logic
Solr’s Vector Search Capabilities Are Proven
Vector support is not new to Solr. Since version 9.x, it has supported:
- DenseVectorField for storing vector embeddings
- HNSW indexing for fast nearest neighbor search
The key is how you use it.
Most teams struggle not with Solr’s vector features themselves, but with:
- Generating high-quality, intent-rich embeddings
- Balancing traditional scoring with vector similarity
- Integrating semantic retrieval into existing SAP OCC and storefront architectures
Our solution solves for all three by integrating OpenAI embeddings, hybrid retrieval logic, and business filtering tailored for SAP Commerce environments.
Architecture Overview
Our semantic search implementation is modular and cloud-ready.
Core Components:
- OpenAI Embedding API: For generating contextual vector embeddings
- Apache Solr 9.x: With
DenseVectorField
and HNSW indexing - Javalin REST API (Java 17): Manages search routing and hybrid scoring. This API layer can and should be developed natively within your SAP Commerce stack.
- SAP OCC APIs: Used for real-time product data synchronization and category mapping
Query Flow:
- Parse input for structured metadata
- Generate vector embedding
- Perform text and vector retrieval
- Score and rank merged results
- Apply filters and sort based on business rules
Your Next Step: Add AI Search to Solr Without Rebuilding Your Stack
Solr already includes the building blocks for modern, AI-enhanced search. By introducing semantic embeddings, intelligent query parsing, and hybrid scoring logic, you can significantly enhance your SAP Commerce search experience—with no need to replace core infrastructure.
Need Help? Work With HybrisArchitect.com
We help SAP Commerce teams modernize search stacks strategically and incrementally.
Our Services Include:
- Implementation of hybrid and vector-based Solr search
- Integration of OpenAI, Cohere, or SBERT embeddings
- Tuning of scoring models, filters, and business rules
- Architecture reviews and pilot programs
- Performance audits and optimization for large catalogs
We also offer a 30-day proof-of-concept engagement, including:
- Live pilot side-by-side with your current search
- Business metric tracking (CTR, conversion, bounce rate)
- Roadmap for gradual rollout
📧 Contact: info@hybrisarchitect.com
About HybrisArchitect.com
We partner with SAP Commerce teams to solve complex architecture challenges, modernize legacy capabilities, and drive digital growth. Whether your roadmap includes AI search, headless commerce, or performance replatforming, our team brings the hands-on experience to deliver results.