How to configure search by SKU
Use the steps below to configure search by SKU based on your goals.
How to include SKUs in search
If the Search extension can't find a product by SKU, use the steps described below to make this possible.
-
Make SKU attribute searchable
Navigate to Stores -> Attributes -> Product Grid -> SKU -> Storefront Properties. Enable the Use in Search and Visible in Advanced Search options.
After this, the SKU attribute will be available for search.
-
Add SKU to Product index
Navigate to System -> Search Management -> Search Indexes -> Product Index and add SKU in the Searchable attributes table.
Set the search weight (from 1 to 10) to define the importance of the SKU attribute for product relevance. Reindex your changes.
-
Configure Long Tail for SKU with non-alphabetic symbols
If your product SKU contains dashes or other non-alphabetic symbols, you will need to configure long tail search expressions. This will allow the extension to correctly process complex data and provide relevant search results.
-
Validate the search result
To check if product is available in the search by SKU using Search result validator.
The steps described above can also be used to set up search for any custom product attribute.
How to exclude SKUs in search
Use the steps described below to limit the search by SKU.
Exclude search for all products by SKU
-
Navigate to Stores -> Attributes -> Product, find the SKU attribute, and switch to the Storefront Properties tab where you set the Use in Search option to No.
-
Reindex the changes after making the modifications.
Exclude search for specific SKUs
-
Starting from module version v.2.2.63, support for Shared Catalogs and Category Permissions features for Adobe Commerce has been added. Use them to limit search results.
-
Reindex the changes after making the modifications.