SyliusCon 2025
Early Bird Deal
LogoLogo
🛣️ Roadmap💻 Sylius Demo💬 Community Slack
  • Sylius Documentation
  • Sylius Plugins
  • Sylius Stack
  • 📖Sylius 2.0 Documentation
    • Organization
      • Release Cycle
      • Backwards Compatibility Promise
      • Sylius Team
      • Sylius Roadmap
  • Getting Started with Sylius
    • Installation
    • Basic Configuration
    • Shipping & Payment
    • First Product
    • Customizing the Shop
    • Customizing Business Logic
    • Using API
    • Installing Plugins
    • Deployment
    • Summary
  • The Book
    • Introduction to Sylius
    • Installation
      • System Requirements
      • Sylius CE Installation
        • Sylius CE Installation with Docker
      • ➕Sylius Plus Installation
      • Upgrading Sylius CE
      • Upgrading Sylius Plus
    • Architecture
      • Architecture Overview
      • Architectural Drivers
      • Resource Layer
      • State Machine
      • Translations
      • E-Mails
      • Contact
      • Fixtures
      • Events
    • Configuration
      • Channels
      • Locales
      • Currencies
    • Customers
      • Customer & ShopUser
      • ➕Customer Pools
      • AdminUser
      • Addresses
        • Countries
        • Zones
        • Addresses
        • Address Book
    • Products
      • Products
      • Product Reviews
      • Product Associations
      • Attributes
      • Pricing
      • Catalog Promotions
      • Taxons
      • Inventory
      • ➕Multi-Source Inventory
      • Search
    • Carts & Orders
      • Orders
      • Cart flow
      • Taxation
      • Adjustments
      • Cart Promotions
      • Coupons
      • Payments
      • 🧩Invoices
      • Shipments
    • Support
    • Contributing
      • Contributing Code
        • Submitting a Patch
        • ⚠️Security Issues
        • Coding Standards
        • Conventions
        • Sylius License and Trademark
      • Contributing Translations
      • Key Contributors
  • The Customization Guide
    • Customizing Models
      • How to add a custom model?
      • How to add a custom translatable model?
    • Customizing Forms
      • How to add a live form for a custom model?
    • Customizing Styles
    • Customizing Validation
    • Customizing Menus
    • Customizing Templates
    • Customizing Translations
    • Customizing Flashes
    • Customizing State Machines
    • Customizing Grids
    • Customizing Fixtures
    • Customizing API
    • Customizing Serialization of API
    • Customizing Payments
      • How to integrate a Payment Gateway as a Plugin?
  • 🧑‍🍳The Cookbook
  • How to resize images?
  • How to add one image to an entity?
  • How to add multiple images to an entity?
  • Sylius 1.X Documentation
    • 📓Sylius 1.x Documentation
Powered by GitBook
LogoLogo

Developer

  • Community
  • Online Course

About

  • Team

© 2025 Sylius. All Rights Reserved

On this page
  • Grid Filters
  • Customizing the Search Filter
  • ElasticSearch Integration
  • Steps to Integrate ElasticSearch:

Was this helpful?

Edit on GitHub
  1. The Book
  2. Products

Search

PreviousMulti-Source InventoryNextCarts & Orders

Last updated 8 months ago

Was this helpful?

Product search is a common feature in eCommerce systems, and Sylius offers a simple solution through its grid filter functionality. For more advanced use cases, you can extend this functionality or integrate it with ElasticSearch.

Grid Filters

For basic product search needs, Sylius provides search filters within its grids. For example, you can search for products by name in a product category using the grid filter.

Here’s an example configuration for the product grid search:

# Sylius/Bundle/ShopBundle/Resources/config/grids/product.yml
filters:
    search:
        type: string
        label: false
        options:
            fields: [translation.name]
        form_options:
            type: contains

This configuration allows users to search by product names that contain the string entered in the search bar.

Here’s an example of what the search bar looks like:

Customizing the Search Filter

In many shops, a more sophisticated search might be needed. You may want to add filters for price, reviews, sizes, or colors.

If you want to extend the built-in search functionality, you can refer to:

These resources will guide you on how to modify and extend Sylius grid filters to suit your specific needs.

ElasticSearch Integration

If the grid filtering functionality does not meet your requirements, and you need a more advanced search solution, you can integrate ElasticSearch into your Sylius project.

For this, you can use the BitBagCommerce/SyliusElasticsearchPlugin. This plugin extends Sylius functionalities with ElasticSearch, allowing for faster and more complex searches.

Steps to Integrate ElasticSearch:

  1. Install the plugin via Composer:

    composer require bitbag/sylius-elasticsearch-plugin
  2. Set up the ElasticSearch server.

  3. Configure ElasticSearch in your Sylius application.

The Documentation

For detailed instructions, refer to the plugin's .

The Grids Customization Guide
GridBundle
README documentation on GitHub