UpStart Commerce Search
Spell Correction

Implementing Spell Correction

8min

Step 1: Through NoChannel Commerce Portal PIM or Product Catalog

Step 1: Through NoChannel Commerce Portal PIM
Step 1: Through NoChannel Commerce Portal Product Catalog

To enable Spell Correction on your products through our PIM system, the following are the steps: 

  1. Access the NoChannel Commerce Portal and navigate the PIM (Product Information Management) section. 
  2. Go to Attributes and click the Create Attribute button to create a new attribute or click on an existing attribute to update. 
    • When creating a new attribute, make sure the attribute type is set to “string”, otherwise, spell check configuration will not be available on any other type. 
    • Select the Product Scope Level as either Product, Variant, or Overrideable
    • Note: For details on Attribute Types and Product Scope Level, go to PIM Attribute Data Types
  3. On the Attribute Detail page, locate the Search Configurations section at the bottom. 
  4. Under Default Mappings, enable Indexed and Misspelling Supported. This activates the spell correction functionality for the specific attribute.
  5. Publish the Attribute and navigate to the Product Templates.
    • On Product Template, click on the Create Template button to create a new template or edit an existing template.
    • Select the spell check enabled attributes to add them to the Product Template.
    • Once all the required attributes are added, publish the Product Template.
    • For more details on creating a product template, go to PIM Basic Guide to Product Modeling.
Document image


Note: The Misspelling Supported mapping can only be enabled for the string type attributes.

Step 2: Reindexing

After enabling the Spell Correction feature for Product Types in the Product Catalog and Attributes in the PIM, administrators or users with specific user permissions can ensure the search data is up-to-date and accurate by reindexing the live catalog items. The NoChannel Search API provides two endpoints for this purpose.

Curl


This endpoint allows administrators to reindex the search data for live catalog items. It is essential to ensure that any product types and attribute changes are accurately reflected in the search results. The authorized permission catalog.search.reindex is required for this operation.

Curl


Similarly, this endpoint allows administrators to reindex the search data for work-in-progress (WIP) catalog items. This ensures that any changes or updates made to the WIP products are reflected accurately in the search results. As with the previous endpoint, the catalog.search.reindex permission is required.

Step 3: Through the NoChannel Commerce APIs

Step 1: Creating a Route with Spell Check (Optional)

You may create a new route only if one does not exist that needs to have spell check enabled. To create a route using the ML-based spell check solution, use the following command, or simply add the spellCheck block to your existing route curl:

Curl


This command creates a route named "spellcheck_route" using the ML-based spell check solution.

Notes:

  • You can switch between OpenSearchBased and MLBased.
  • The Index is used in Route must have spell check enabled properties. (catalog_live.name is spell checkable by default).

Step 2: Searching with Spell Check

To search on the created route with corrections, use the following command:

Curl


This command searches on the "spellcheck_route" with the query "matres" and returns spell check suggestions with highlighted corrections using the ML-based model.

Usage Guidelines

  • Business Owners: Implementing the Spell Check API primarily improves search and quality of results, and enhances user satisfaction, leading to increased conversion rates and customer loyalty.
  • Developers: Integrate the API seamlessly into your platform to ensure accurate search results, providing a smoother user experience.

Go to the Routes API document for more details.