The project is in a healthy, maintained state
Extends Spree search functionality to include product descriptions in search queries
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

Runtime

 Project Readme

Spree Search with Description

This extension enhances Spree Commerce search functionality to include product descriptions in search queries.

Features

  • Extends product search to include product descriptions
  • Supports multi-language search through product translations
  • Maintains compatibility with existing search features (price filters, sorting, etc.)
  • Optimized single SQL query for all search conditions

Installation

Add this line to your application's Gemfile:

gem 'spree_search_with_description', path: 'engines/spree_search_with_description'

And then execute:

bundle install

Usage

Once installed, the extension automatically enhances the search functionality. Users can now search for products using:

  • Product names
  • Product descriptions (including translated versions)
  • SKUs
  • All existing search filters continue to work

Technical Details

The extension works by:

  1. Replacing the default Spree::Products::Find finder with Spree::ProductsWithDescriptionFinder
  2. Extending the by_query method to include description fields in the search
  3. Supporting both main product table and translation table descriptions
  4. Maintaining all existing search functionality (filters, sorting, etc.)

Development

This extension follows standard Spree extension patterns and integrates seamlessly with the existing search infrastructure.