Skip to content
Logo-black
  • Native Commerce Core™
    • IDC-marketscape-q4-2024-resources-hub-cover-562x562@2x

      Constructor is a leader in the IDC marketscape

      Constructor is a Leader in the IDC MarketScape on Worldwide Knowledge Discovery Software for External-Facing Use Cases, 2024.

        • Search & Autosuggest

          Hyper-personalized ecommerce search driven by AI and real-time shopper behavior.

        • Browse

          Personalize your ecommerce category pages for maximum conversions.

        • Recommendations

          Drive upsells and increase RPV with hyper-personalized product recommendations.

        • Collections

          Dynamic, personalized ecommerce collection pages that learn from every search, click, and purchase.

        • Quizzes

          Create smart product recommendation quizzes that drive shopper engagement.

        • Merchant Controls & Intelligence

          Get the ecommerce merchandising controls and insights you need to make high-impact changes that drive revenue.

        • Attribute Enrichment

          Automatically enrich product attributes and categories to give shoppers the best possible experience.

        • AI Shopping Assistant

          Help your online customers discover great products faster.

        • Retail Media

          Constructor Sponsored Listings complement (instead of compete with) your organic results.

        • Cross-Channel & Offsite Discovery

          Create and launch personalized, data-driven marketing campaigns across digital channels.

        • B2B Use-Cases

          Product discovery technology that’s purpose-built to handle the complex needs of B2B ecommerce.

  • Customers
    • Beyond Relevance Featured

      Beyond Relevance Report

      The Data-Backed Case for Attractiveness as the New Standard for Ecommerce Search Performance.

        • Upcoming Events

          Visit us in person at ecommerce industry events.

        • Reports & Guides

          New research, guidance, and insights for the future of retail.

        • Webinars

          Educational webinars, conversations with Constructor partners, and more.

        • Blog

          The latest ideas and news from the frontier of commerce search and discovery.

        • Split/Test Digest

          The most interesting learnings from A/B testing at Constructor.

        • News

          Read Constructor's latest news coverage and press announcements.

        • Documentation

          Learn about the components of Constructor's advanced, AI-powered product discovery suite.

        • About Us

          With AI in our DNA and by keeping ecommerce as our core focus, we’ve built the best product search and discovery solution specifically for the unique needs of retailers.

        • Partners

          Constructor partners with the world’s top retail consultants, systems integrators, and technology platforms.

        • Careers

          Constructor is building the next generation of search solutions.

Login
Book a Demo
  • Native Commerce Core™
    • IDC-marketscape-q4-2024-resources-hub-cover-562x562@2x

      Constructor is a leader in the IDC marketscape

      Constructor is a Leader in the IDC MarketScape on Worldwide Knowledge Discovery Software for External-Facing Use Cases, 2024.

        • Search & Autosuggest

          Hyper-personalized ecommerce search driven by AI and real-time shopper behavior.

        • Browse

          Personalize your ecommerce category pages for maximum conversions.

        • Recommendations

          Drive upsells and increase RPV with hyper-personalized product recommendations.

        • Collections

          Dynamic, personalized ecommerce collection pages that learn from every search, click, and purchase.

        • Quizzes

          Create smart product recommendation quizzes that drive shopper engagement.

        • Merchant Controls & Intelligence

          Get the ecommerce merchandising controls and insights you need to make high-impact changes that drive revenue.

        • Attribute Enrichment

          Automatically enrich product attributes and categories to give shoppers the best possible experience.

        • AI Shopping Assistant

          Help your online customers discover great products faster.

        • Retail Media

          Constructor Sponsored Listings complement (instead of compete with) your organic results.

        • Cross-Channel & Offsite Discovery

          Create and launch personalized, data-driven marketing campaigns across digital channels.

        • B2B Use-Cases

          Product discovery technology that’s purpose-built to handle the complex needs of B2B ecommerce.

  • Customers
    • Beyond Relevance Featured

      Beyond Relevance Report

      The Data-Backed Case for Attractiveness as the New Standard for Ecommerce Search Performance.

        • Upcoming Events

          Visit us in person at ecommerce industry events.

        • Reports & Guides

          New research, guidance, and insights for the future of retail.

        • Webinars

          Educational webinars, conversations with Constructor partners, and more.

        • Blog

          The latest ideas and news from the frontier of commerce search and discovery.

        • Split/Test Digest

          The most interesting learnings from A/B testing at Constructor.

        • News

          Read Constructor's latest news coverage and press announcements.

        • Documentation

          Learn about the components of Constructor's advanced, AI-powered product discovery suite.

        • About Us

          With AI in our DNA and by keeping ecommerce as our core focus, we’ve built the best product search and discovery solution specifically for the unique needs of retailers.

        • Partners

          Constructor partners with the world’s top retail consultants, systems integrators, and technology platforms.

        • Careers

          Constructor is building the next generation of search solutions.

Login
Book a Demo
Back to Blog

Improving Your Site Search: Monitoring Zero Result Searches

Posted on:
March 17, 2015
Author:
Dan McCormick
Table of Contents:

Monitoring searches that don’t return any results is an important part of improving any search  experience. So-called “zero result searches” give you valuable data about what your customers are looking for but aren’t finding, giving you important clues about what products or services you should add.

In addition, zero result searches can give you useful information about how your customers are misspelling search terms, or using words that aren’t in your search engine, which you can then add to your search engine if appropriate.

One way to monitor zero result searches is to simply log them to your database every time they happen, with the exact query the user typed in and the date it occurred. Then, you can periodically aggregate this information by day and truncate the logging table so it doesn’t grow overly big. This approach is simple and works well for low-traffic sites, but isn’t a great idea for sites with lots of visitors, since it may cause a lot of work for your production database.

Another simple approach uses a third-party service called Loggly that provides a free subscription for simple uses like this.

Loggly is a general logging service that can be used with almost all modern web frameworks. I’ll be showing how to set it up using Ruby on Rails, but the same approach also applies to other languages and frameworks.

The first step is to sign up for a free account at Loggly. Then, add the Loggly gem to your Gemfile:

gem 'logglier'

and run “bundle install” to install it.

Next, create an initializer at config/initializers/loggly.rb containing:

loggly = Logglier.new('https://logs-01.loggly.com/inputs/[token]/tag/rails', threaded: true, format: :json)
Rails.logger.extend(ActiveSupport::Logger.broadcast(loggly))

Where [token] is the customer token you can find by clicking on “Source Setup” and then “Customer Tokens” in your Loggly account.

This initializer extends the native Rails logging object so that it also sends data to Loggly.

Then, wherever you call your search engine in your application, add a line like this:

logger.info event: "search", query: params[:query], num_results: @search_results.size, environment: Rails.env

Here, “params[:query]” is the query passed in by the user. @search_results is the variable containing the results from the search engine, so @search_results.size gives the total number of results. And I include the environment so that I can distinguish between tests in the development environment and real production traffic.

Then login to your Loggly account and click the “Search” tab. In the Field Explorer on the left, you should see a list similar to this:

Click “JSON” and then “num_results”. That will open a panel that looks like this:

Enter “0” in the field shown and click “Apply”. This will show you a list of all the log entries that have zero search results. To display a more readable view of the data, click the Grid View icon:

Then click the orange “Add field column to grid” button, select “json.query” and voila! You now have a list of all the searches that returned zero results, which you can download by clicking the “Export grid events” icon on the right.

You can even click the “Trends View” icon (next to the Grid View icon) to see pie charts and line charts of the data (just select “Split by: json.query”). Once you’re done testing and have pushed your code to production, you can add an “environment: production” filter (in the same list of JSON parameters you used above) to only show production traffic.

Monitoring your site’s zero result searches is an excellent way to continually improve your site’s search experience. Whether you write the queries to a database or integrate with a third-party service like Loggly, you’ll gain valuable insight about your users’ behavior.

Subscribe to our Blog

Get conversion-driving insights delivered straight to your inbox.

What's next?

Uncover lost revenue opportunities with a complimentary Search Experience Audit.

According to the 2024 State of Ecommerce Search & Product Discovery Survey, nearly 70% of shoppers think the search function on retail websites needs an upgrade. Our team has run over 1000 A/B tests to identify easy-to-implement algorithmic and UX improvements that get results. Use their research to your advantage with a complimentary Search Experience Audit — no strings attached.

Request an Audit
  • Analyze your search results quality
  • Identify "no results" pages
  • Pinpoint irrelevant results for long-form queries
  • Uncover UX opportunities for Search, Autocomplete, and PLPs

According to the 2024 State of Ecommerce Search & Product Discovery Survey, nearly 70% of shoppers think the search function on retail websites needs an upgrade. Our team has run over 1000 A/B tests to identify easy-to-implement algorithmic and UX improvements that get results. Use their research to your advantage with a complimentary Search Experience Audit — no strings attached.

Request an Audit
  • MACH Certified
  • 21972-312_SOC_NonCPA-150x150
  • Cartification-mark_04-09-300x253-1-150x150
Constructor.io Logo
  • Technology
    • Native Commerce Core™
    • Request a Demo
    • The Proof Schedule®
  • Solutions
    • Search & Autosuggest
    • Browse
    • Recommendations
    • Collections
    • Quizzes
    • Merchant Controls & Intelligence
    • Attribute Enrichment
    • AI Shopping Assistant
    • B2B Solutions
  • Resources Hub
    • Events
    • Reports, Guides & Webinars
    • Blog
    • Experiments
    • News
    • Constructor vs Alternatives
    • Documentation
  • About
    • About Us
    • Partners
    • Security & Compliance
    • Careers
  • Technology
    • Native Commerce Core™
    • Request a Demo
    • The Proof Schedule®
  • Solutions
    • Search & Autosuggest
    • Browse
    • Recommendations
    • Collections
    • Quizzes
    • Merchant Controls & Intelligence
    • Attribute Enrichment
    • AI Shopping Assistant
    • B2B Solutions
  • Resources Hub
    • Events
    • Reports, Guides & Webinars
    • Blog
    • Experiments
    • News
    • Constructor vs Alternatives
    • Documentation
  • About
    • About Us
    • Partners
    • Security & Compliance
    • Careers
© 2025 Constructor All rights reserved
  • Terms of Service
  • Privacy Policy