How Solr and Elasticsearch Calculate Search Results: A Guide for B2B and Wholesale eCommerce

July 14, 2025

In B2B eCommerce, the search bar is often the starting point of a transaction and the first place where friction typically appears. Whether your customers are contractors looking for copper fittings or procurement teams sourcing electrical components, their expectations are simple: fast, accurate, and relevant results.

 

But here's what most teams don't realize: the search experience in your eCommerce platform typically isn't actually "built" by that platform. It's usually powered by an embedded search engine, like Apache Solr or Elasticsearch. These engines do the heavy lifting of indexing product data, parsing queries, and scoring relevance, all under the hood. And if search results aren't returning what they should, it's because of either poor quality product data or search engine implementation.

 

 

What Actually Powers Your Platform’s Search?

 

Many leading B2B eCommerce platforms rely on these open-source engines to power their native search:

 

 

If you're managing a site on any of these platforms and wondering why your search results seem off, this is the place to start.

 

 

What Is Indexing, and Why It Matters in B2B?

At the core, Solr and Elasticsearch rely on Apache Lucene, a high-performance search library. They start by indexing your product catalog, breaking down text into searchable pieces called tokens and creating an "inverted index". This index maps every term to the documents (or products) containing it, enabling lightning-fast lookups.

 

Inverted Index Diagram
Inverted Index, Image Credit: Exploring Apache Lucene

 

Indexing is particularly critical in B2B eCommerce for manufacturers and distributors, where SKUs, part numbers, technical specs, and structured data drive purchasing decisions. If your index isn't structured or enriched correctly, even the most powerful search engine will underperform.

 

When a user enters a search query—like "2-inch brass check valve" or "EMT conduit 3/4"—the engine parses that query and matches it against the index. That parsing supports logic like keywords, phrases, wildcards, and filters. It also allows complex boolean queries like "pipe fittings AND copper NOT plastic."

 

 

How Search Engines Score Relevance

Once a query is parsed, Solr and Elasticsearch apply ranking algorithms to score each document's relevance:

 

 

Elastic has a great breakdown of BM25 here

 

These scoring functions ensure the most relevant products appear first, but only if your data, queries, and weighting strategies are aligned with how your buyers search.

 

 

Why Search Configuration Matters in B2B eCommerce

When a contractor is in the field, a procurement officer is placing a restock order, or a buyer is vetting a BOM upload, search is the front door. Inaccurate or poorly ranked results directly impact conversion rates, average order value, and customer satisfaction.

 

For manufacturers and distributors, optimized search:

 

 

The challenge isn’t just the search engine; it’s properly implemented Solr/Elasticsearch pulling from quality and accurate product data, to reflect the real-world needs of your buyers.

 

 

Mastering Search with the Search Fitness Program

Solr and Elasticsearch offer the foundation for high-performing B2B search, but real success comes from how you apply them. That means more than flipping configuration switches or relying on defaults. It means understanding how buyers search, what they expect to see, and how to shape your search engine to match that intent.

 

Layer One’s Search Fitness Program was built specifically for manufacturers and distributors facing this challenge. It’s a 90-day engagement that turns confusion into clarity by teaching your team the mechanics of indexing, scoring models like TF-IDF and BM25, and hands-on configuration, then aligning it all to actual buying journeys.

 

We don’t just optimize search, we train your team to:

 

 

Layer One's Search Fitness Program includes a comprehensive audit of your site’s search, identifying gaps, misalignments, and opportunities, along with tailored solutions supported by configurations and coaching to resolve them. We also provide a customized tool for your eCommerce platform to identify, monitor, and ensure your top searches always produce results.

 

You’ve now seen how Solr and Elasticsearch calculate search results. The next step is using that knowledge to take control, shaping search to match buyer intent and drive revenue.

 

Ready to fix your site search for good? Let’s talk.