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.
- Log in to the Management Center and navigate to the Aurora Esite store.
- Create some test products and SKUs. In this example, the product
is
television
. - Create three descriptive attributes for the product: Color, Size, and Length.
- 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.
Procedure
-
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" } ] } ] } }
- Restart the Query service after making this change.