Magento 2 Search Configuration: Steps for Catalog Search Settings

Magento 2 Search Configuration: Steps for Catalog Search Settings

Looking to optimize your Magento 2 search configuration for better results? Search configuration extension enhances the search functionality of your online store.

This tutorial will cover how to configure advanced search options in Magento 2.

Key Takeaways

  • Configure search engine options, search term management, and advanced search features.
  • Ensure your store’s search is optimized for maximum performance.
  • Set up the search engine and manage search terms.
  • Future trends in Elasticsearch server and MySQL search engine settings.
  • Troubleshooting steps to monitor and adjust search settings regularly to maintain performance.
  • Tips to fine-tune your store’s search functionality to meet your customers' needs.

6 Steps For Admin Panel Search Engine Configuration In Magento

  1. Log in to the Magento Admin panel as an administrator.
  2. Navigate to Stores > Settings > Configuration > Catalog > Catalog > Catalog Search.

Magento 2 admin panel showing catalog search configuration options for optimizing search settings

  1. Choose the appropriate version of your search engine in the Search Engine dropdown.

search engine configuration in Magento 2 with Elasticsearch selected for better search performance

The table outlines the necessary options for configuring & testing the connection with Commerce.

Note: If you haven't modified your search engine's server settings, the default values should suffice. You can then proceed to the next step.

Option Description
Server Hostname Enter the qualified hostname/IP address of the machine running Elasticsearch or OpenSearch.
Adobe Commerce on cloud infrastructure: Obtain this value from your integration system.
Server Port Enter the web server proxy port. The default is "9200".
Adobe Commerce on cloud infrastructure: Obtain this value from your integration system.
Index Prefix Enter the search engine index prefix. If you are using a single instance for multiple Commerce installations, specify a unique prefix for each. For example, Staging and Production environments. Otherwise, you can use the default prefix magento2.
Enable HTTP Auth Select "Yes" only if authentication is enabled for your search engine server. If so, provide the required username and password in the corresponding fields.
Server Timeout Enter the timeout duration (in seconds). Establish a connection to the Elasticsearch or OpenSearch server.
  1. Click on 'Test Connection'.
  2. If successful, you'll see a "success" message. You can then proceed with configuring either Apache or nginx for your search engine.

Magento 2 showing success and failure messages for testing search engine connection

  1. If the test fails, consider the following troubleshooting steps:
  • Ensure the search engine server is running.
  • If the server is on a different host than Commerce, log in to the Commerce server. Ping the search engine host. Resolve any network connectivity issues and retest the connection.
  • Check the command window where Elasticsearch or OpenSearch was started for any stack traces or exceptions. Resolve these issues before continuing. Ensure that the search engine is started with root privileges.
  • Verify that both the UNIX firewall and SELinux are disabled. Or configure them to allow communication between the search engine and Commerce.
  • Double-check the Server Hostname field to ensure that the server is available. You might also try using the server’s IP address.
  • Use the netstat -an | grep <listen-port> command. It verifies that another process isn't using the port specified in the Server Portal field.

For example, to check if your search engine is running on its default port, use:

netstat -an | grep 9200

If the search engine is running on port "9200", you'll see output similar to:

tcp 0 0 :::9200 :::- LISTEN

General Magento 2 Search Terms

Option Description Default Value
Minimal Query Length Minimum characters allowed in catalog search. Must be compatible with search engine settings. Varies
Maximum Query Length Maximum characters allowed in catalog search. Must be compatible with search engine settings. Varies
Top Search Results to Cache Number of popular search terms and results to cache for faster responses. 100
Autocomplete Limit Maximum number of search results displayed for autocomplete. 8
Enable Search Suggestions Determines if suggestions appear for common misspellings. Yes/No
Search Suggestions Count Maximum number of search suggestions offered. 2
Show Results Count for Suggestions Displays the number of search results for each suggestion. Yes/No
Enable Search Recommendations Offers recommendations when a search returns "no results".

For example, if a customer searches for "winter coat" but the exact term isn't in your catalog, the system might recommend "winter jacket", "parka", or "cold weather outerwear".
Yes/No
Search Recommendations Count Number of search terms offered as recommendations. 5
Show Results Count for Recommendations Displays the number of Magento products found for each recommendation. Yes/No

Magento 2 Advanced Catalog Search Configuration Techniques

Technique Description Steps Benefits
Implementing Elasticsearch Integrate Elasticsearch as the default search engine for Magento 2. 1. Install Elasticsearch.
2. Configure Magento to use Elasticsearch.
3. Reindex catalog search.

For example, searching for "running shoes" would also match "run shoe" or "runner's footwear".
- Improved search relevance
- Faster query processing
- Support for large catalogs
Optimizing Search Indexing Fine-tune the indexing process for better search performance. 1. Adjust indexer settings.
2. Schedule indexing during off-peak hours.
3. Monitor and optimize server resources.
- Reduced indexing time
- More accurate search results
- Lower server load
Enhancing Layered Navigation Implement faceted search with customizable filters. 1. Configure attribute properties.
2. Set up filter options.
3. Customize layered navigation display.
- Improved user experience
- Faster product discovery
- Increased conversion rates
Enabling Advanced Search Configure advanced search settings and customize fields. 1. Go to Stores > Configuration > Catalog > Catalog Search.
2. Enable 'Advanced Search'.
3. Customize product attributes for search.
4. Save and test.
- More refined search options
- Better control over search parameters
- Enhanced user satisfaction
Managing Search Recommendations Set up and optimize search recommendations. 1. Enable 'Search Recommendations' in Catalog Search settings.
2. Set 'Recommendations Count'.
3. Configure the 'Show Results Count' option.
4. Save and test.
- Improved product discovery
- Increased cross-selling opportunities
- Better user engagement
Customizing Search Attributes Configure which product attributes are searchable. 1. Go to Stores > Attributes > Product.
2. Edit relevant attributes.
3. Set 'Use in Search' to "Yes" for desired attributes.
- More relevant search results
- Tailored search experience
- Improved product findability
Implementing Synonyms Add synonym groups for common search terms. 1. Navigate to Marketing > SEO & Search > Search Synonyms.
2. Add new synonym groups.
3. Associate synonyms with Magento store views.
- Broader search coverage
- Reduced "no results" pages
- Better handling of variations

How To Reindex & Refresh The Full Page Cache Connected With The Catalog Search In Magento 2?

Method 1: Using the Admin Panel

  1. In the Admin panel, go to System > Cache Management.
  2. Select the checkbox next to 'Page Cache'.
  3. From the 'Actions' dropdown in the upper right, select "Refresh".

To clean the Magento cache, use the command line:

bin/magento cache:clean

full page cache reindexing options in Magento 2 for better catalog search performance

Method 2: Using the Command Line

  1. Log in to your Commerce server as the file system owner, or switch to that user.
  2. Use one of the following commands:

To reindex only the catalog search index:

bin/magento indexer:reindex catalogsearch_fulltext

To reindex all indexers:

bin/magento indexer:reindex

Note: Unlike the cache, indexers are updated by a cron job. Ensure cron is enabled before starting to use your search engine.

Best Practices For Configuring Popular Search Terms In Magento 2

Best Practice Description Implementation Steps
Analyze Search Data Review popular search terms and zero-result searches. 1. Go to Marketing > SEO & Search > Search Terms.
2. Analyze the Search Query Report.
3. Identify frequently used terms and those with no results.
Implement Autocomplete Set up search suggestions and autocomplete. 1. Go to Stores > Configuration > Catalog > Catalog Search.
2. Enable 'Search Suggestions'.
3. Set the 'Search Suggestions Count'.
4. Configure 'Show Results. Count' for each suggestion.
Set Up Redirects Create redirects for popular search terms. 1. Go to Marketing > SEO & Search > Search Terms.
2. Add or edit a search term.
3. Set a Redirect URL for specific search queries.
Customize Search Results Page Optimize the layout and content of search results. 1. Go to Content > Design > Configuration.
2. Edit the search results page layout.
3. Customize product information displayed in results.

4 Steps To Configure Catalog Search Commerce With OpenSearch

Step 1: Configure General Search Options

  1. On the Admin sidebar, go to Stores > Settings > Configuration.
  2. In the left panel, expand Catalog and select Catalog underneath.
  3. Expand the Catalog Search section.
  4. Set values for Minimal Query Length and Maximum Query Length. It is optional. It limits the length and word count of search queries.

Note: Ensure that the minimum and maximum values set here are compatible with the corresponding range in your search engine configuration. For example, if these values are set to "2" and "300" in Commerce, update the search engine settings.

  • Number of Top Search Results to Cache: Set a value for this field. It is optional. It limits the number of popular search results cached for faster responses. The default value is "100". Setting the value to "0" will cache all search terms and results when entered a second time.
  • Enable EAV Indexer: To enable or disable this option, set Product EAV Indexer. It enhances indexation speed & restricts the indexer from being used by third-party extensions.
  • Autocomplete Limit: Set a value for this field. It limits the maximum number of search results displayed for search autocomplete. Lowering this value improves search performance & reduces the size of the displayed list. The default value is "8".

minimal query length configuration in Magento 2 for improving search result accuracy

Note: Neither OpenSearch nor Elasticsearch provides out-of-the-box support for suffix-based search. For instance, searching by "SKU" might not yield the expected result if the keyword contains only the latter part of the "SKU".

Step 2: Configure the OpenSearch Connection

The following fields are configured during the installation or upgrade of Commerce:

  • Search Engine
  • OpenSearch Server Hostname
  • OpenSearch Server Port
  • OpenSearch Index Prefix
  • Enable OpenSearch HTTP Auth
  • OpenSearch Server Timeout
  1. Change the above values only when upgrading or modifying OpenSearch.

Check the below steps for general configuration:

  • Search Engine: Select OpenSearch for this option.
  • OpenSearch Server Hostname: Use the default value configured during installation.
  • OpenSearch Server Port: Accept the default value (usually "9200").
  • OpenSearch Index Prefix: Enter a prefix to identify the Elasticsearch index. The default value is "magento2".
  • Enable OpenSearch HTTP Auth: Set this option to "Yes". It enables HTTP authentication for accessing the OpenSearch server.
  • OpenSearch Server Timeout: Enter the number of seconds before the system times out (default is "15 seconds").
  1. To verify the configuration, click on 'Test Connection'.

Step 3: Configure Suggestions and Recommendations

Search suggestions and recommendations can affect server performance. Check the steps below to enable recommendations and suggestions:

  • Enable Search Recommendations: Set this option to "Yes". It enables recommendations.
  • Search Recommendation Count: Specify the number of recommendations to display.
  • Show Results Count for Each Recommendation: Set this option to Yes. It shows the number of results found for each recommendation.
  • Enable Search Suggestions: Set this option to "Yes". It enables search suggestions.
  • Search Suggestions Count: Specify the number of search suggestions to display.
  • Show Results for Each Suggestion: Set this option to "Yes". It shows the number of results found for each suggestion.

Step 4: Configure Minimum Terms to Match

  1. Control the minimum number of terms from a query that the search results should match.
  • Minimum Terms to Match: Specify a value for this field. It helps ensure optimal relevancy of search results for shoppers.

Note: For a list of accepted values, refer to the minimum_should_match parameter.

  1. Click on the 'Save Config' button.

Troubleshooting Common Magento 2 Product Catalog Navigation Issues

Issue Possible Cause Troubleshooting Steps
Categories Not Displaying Incorrect category configuration or indexing issues 1. Verify category is active and visible in navigation.
2. Reindex catalog categories.
3. Check category permissions.
Slow Category Load Times Large number of products or inefficient indexing 1. Optimize category page size.
2. Implement pagination or lazy loading.
3. Schedule regular indexing.
Incorrect Product Sorting Misconfigured product attributes or sorting options 1. Review product attribute settings.
2. Check the default sorting option in category settings.
3. Clear Magento cache and reindex.
Broken Layered Navigation Attribute configuration issues or indexing problems 1. Verify filterable attributes settings.
2. Reindex catalog attributes.
3. Check Elasticsearch configuration.
Missing Product Images Image import issues or incorrect media settings 1. Verify product image assignments.
2. Check media folder permissions.
3. Reimport product images.
Inconsistent Product Prices Incorrect price rules or indexing issues 1. Review catalog price rules.
2. Check product tier prices and special prices.
3. Reindex product prices.
404 Errors on Category Pages URL rewrite issues or deleted categories 1. Check the URL rewrites in Admin panel.
2. Verify category existence and status.
3. Rebuild URL rewrites.

4 Steps To Configure Magento 2 Search Settings And Terms

Step 1: Enable Search Functionality for a Product

  1. Log in to the Magento 2 Admin Panel.
  2. Navigate to Products > Inventory > Catalog.
  3. Select the product you want to configure for search.

Magento 2 settings for configuring catalog search terms to optimize product search functionality

For Visibility, choose an option from the dropdown list:

  • Not Visible Individually: Hides the product from customers. It won't appear in searches or catalogs.
  • Search: Displays the product only in search results.
  • Catalog: Displays the product only in the catalog, making it non-searchable.
  • Catalog, Search: Displays the product in both the catalog and search results.

Magento 2 product visibility options showing catalog and search settings

For optimal search functionality, selecting the last option is recommended.

Step 2: Configure Search Settings in System Configuration

  1. Go to Stores > Settings > Configuration.
  2. Under the Catalog section, click Catalog.
  3. Expand the Catalog Search section.
  4. Uncheck "Use system value".
  5. Set values for Minimal Query Length and Maximum Query Length.

maximum query length settings in Magento 2 for controlling the search result limits

  1. Click on 'Save Config'.

Step 3: Enable Advanced Search

Advanced search appears in the footer of your website. It allows users to search for products using various filters. Examples include name or color for more accurate results.

To enable this:

  1. Go to Stores > Attributes > Product.
  2. Select the attributes you want to include in the advanced search.
  3. In Storefront Properties, set 'Visible in Advanced Search' to "Yes".

enabling advanced search settings and visibility for Magento 2 products

  1. Click on the 'Save Attribute' button.

Step 4: Manage Search Terms

Search terms are popular keywords used with larger terms indicating higher popularity.

To edit search terms:

  1. Go to Marketing > SEO & Search > Search Terms.
  2. Select the keyword you want to edit.
  3. Make the necessary changes and click on 'Save Search'.

To add new search terms:

  1. Click Add New Search Term and set values for:
  • Search Query: The keyword searched by customers.
  • Redirect URL: Assign a specific page URL to the search results.
  • Display in Suggested Terms: Show suggested keywords if the search term yields no results.
  1. Click on 'Save Search'.
  2. Go to System > Tools > Cache Management to re-index your catalog data.

Future Trends In Magento Search Terms Report

Trend Description Impact on Magento 2 Search Configuration
AI-Powered Search Analytics Machine learning algorithms analyze search patterns and user behavior More accurate search suggestions and personalized results
Voice Search Integration Optimization for voice-activated searches New search term formats and natural language processing
Visual Search Capabilities Image-based search functionality Enhanced product discovery and attribute matching
Real-Time Search Insights Instant analysis of search trends and performance Faster optimization of catalog search and product listings
Predictive Search Anticipating user intent based on previous searches and behavior Improved search relevance and customer experience
Multi-Language Search Support Advanced language processing for global markets Better search configuration for international Magento 2 stores
Semantic Search Understanding Interpreting context and meaning behind search queries More accurate search results and reduced "no results" pages
Mobile-First Search Optimization Tailored search experience for mobile users Responsive search design and touch-friendly interfaces
Social Media Integration Incorporating social trends into search algorithms Enhanced product discovery based on social popularity
Blockchain for Search Security Secure and transparent search data management Improved trust in search results and data privacy

FAQs

1. How does configuring Product Catalog Search enhance the overall search box functionality?

Configuring product catalog search in Magento 2 optimizes the search form. It makes it easier for customers to find items. This improved search box functionality leads to more accurate product search results. It can boost sales by helping customers quickly locate desired products.

2. How can I customize the number of search results to display and integrate a search extension?

In Magento, you can adjust the amount of popular search results. To find the search configuration, navigate to the admin panel. Here, you can set the number of search results to display and integrate a search extension. It allows you to optimize the search experience based on your store's needs.

3. What's the difference between Quick Search and Advanced Search in Magento 2?

Magento 2 offers different types of Catalog Search to cater to various user needs. Quick Search provides fast results from a simple search box. Magento 2 Advanced Search allows customers to use multiple criteria for precise results. The search settings give you control over both functions in Magento platform. It lets you customize how they work. By fine-tuning these settings, you can improve the overall search experience.

4. How does Magento 2 Catalog Search differ from Quick Catalog Search?

Magento 2 Catalog Search and Quick Catalog Search help customers find products. The main catalog search offers more comprehensive results and filtering options. However, Quick Catalog Search provides rapid suggestions as customers type. Both improve how customers can search your store, but they serve different purposes. The Catalog Search is ideal for detailed product exploration. Whereas, Quick Search helps with immediate product location.

5. How does the full text MySQL search engine impact the ability to search for a product in Magento 2?

The full text MySQL search engine enhances your online store's search capabilities. It allows for more accurate and relevant results when users search for a product. You can configure the engine and limit the size of results to display for search. It helps optimize the experience on your Magento 2 store.

6. How can I enable search recommendations and set the search recommendations count?

When a customer types in the search query, the system can provide helpful suggestions. They can do this based on popular searches or related products. Control product search in catalog rather than setting individual methods. It allows you to manage search recommendations and suggestions globally. Also, it ensures consistent and relevant results across your store.

7. How can configuring search terms in Magento 2 help users surf the catalog?

Configuring search terms in Magento 2 is one of the key benefits of Magento. You can set up individual methods and configure search terms. It allows users to surf the catalog by a larger set of relevant results. When a customer enters in the quick search query, they can find what they're looking for. It applies to every variation or synonym of product names.

CTA

Summary

Magento 2 search configuration allows users to find products quickly. It helps:

  • Maximize efficiency and customer satisfaction.
  • Offer users refined search capabilities, enhancing their shopping experience.
  • Customers find products quickly and efficiently.
  • Improve user experience and conversion rates.
  • Boost store efficiency with search recommendations and results.
  • Regularly review and adjust your search configuration to maintain optimal performance.

Optimize your store's search capabilities with Magento hosting services.

Dikshya Shaw
Dikshya Shaw
Technical Writer

Dikshya leverages her content marketing and writing proficiency to deliver fresh, insightful content. Her meticulous research ensures industry expertise and emerging trends within the Magento landscape.


Get the fastest Magento Hosting! Get Started