HCL Commerce Version 9.1.12.0 or later

Recognizing Verbs in Search Strings

Customers on your storefront can sometimes search for products using verbs in the search string. The default Natural Language Processing (NLP) settings in HCL Commerce do not accommodate verbs, but can be changed to recognize them.

About this task

When customers search for products they made use colloquial expressions and phrases that contain verbs. For example, an occasional search string might be similar to “I am looking for a white color Television.” In such a case the customer expects the search system to interpret their natural-language prompt based on the verb, in this case, “looking.” The default Natural Language Processing (NLP) settings in HCL Commerce do not manage verbs in this expected way.

The default NLP approach to verbs
You can experiment with the default NLP processing of verbs using the following procedure.
  1. Log in to the Management Center and navigate to the Aurora Esite store.
  2. Create some test products and SKUs. In this example, the product is television.
  3. Create three descriptive attributes for the product: Color, Size, and Length.
  4. Assign these attributes to your product SKUs with values of
    color(Red, white)
    size(18.72 inch, 12.6 Inch)
    length(30 centimeters,50 centimeters)

Expected result: In subsequent searches using Elasticsearch, search strings that include verbs as well as these attributes would be expected to produce positive results.

  • I am looking for white color Television should produce a list of products with the attribute “white.”
  • I am looking for red color Television should produce a list of products with the color “red.”
  • Searching for 30 centimeters Television would be expected to list products with a length value of thirty centimeters
  • Searching for 15" Television should produce products with a size value of around 15 inches.
Actual result: the search strings do not return the expected content.

Procedure

  1. Use the following REST configuration endpoint to enable support for verbs in natural-language search expressions. If this is the first time you are adding the configuration through the configuration endpoint, use the POST request method. Otherwise, use PATCH.
    POST/PATCH - http://dataQueryHost:dataQueryPort/search/resources/api/v2/configuration?nodeName=component&envType=auth
    Request Body
    -----------------
    {
        "extendedconfiguration": {
            "configgrouping": [
                {
                    "name": "SearchConfiguration",
                    "property": [
                        {
                            "name": "nlp.ignore.verb",
                            "value": "false"
                        }
                    ]
                }
            ]
        }
    }
    
  2. Restart the Query service after making this change.
You may encounter exceptions that are the result of keyword assignments. A keyword could be a verb in its dictionary meaning, but the NLP engine processes keywords as nouns. Such terms can cause a zero result. To avoid this situation, classify those keywords with IGNORE_TERM via the configuration endpoint. For more information, see Adding custom range filter to Matchmaker.