Troubleshooting: Wildcard searches with NLP disabled
If you disable the Natural Language Processing (NLP) service, storefront users can still use wildcard characters in their searches. You can disable wildcards using a setting in the Zookeeper wc-component node.
The following configuration has been added with default value enabled in the
Zookeeper wc-component node.
{
"name": "search.query.wildcard.analyzer",
"value": "true"
}
When search.query.wildcard.analyzer is set to false,
the wildcard character (*) becomes a searchable character instead of a pattern
operator. This analyser can be disabled using the data-query configuration
end-point:POST/PUT http://query-server:server-port/api/v2/configuration?nodeName=component&envType=auth
Where
the body of the POST or PUT operation
is: {
"extendedconfiguration": {
"configgrouping": [
{
"name": "SearchConfiguration",
"property": [
{
"name": "search.query.wildcard.analyzer",
"value": "false"
}
]
}
]
}
}
Assume that
search.query.wildcard.analyzer is set to
false
, and you have a product name '2P.00/DNs 30+35 3KL. CYL.VLOZKA'.
The following results occur when using the EXACT (searchType value
of 1001
) or ANY (searchType value of
1000
) query types.- search.query.wildcard.analyzer = true
-
- searchType
1001
-
searchTerm=2P.00/DNs*
returns the full product name.searchTerm=2P.00/DN*
returns the full product name.
- searchType
1000
-
searchTerm=2P.00/DNs*
returns the full product name.searchTerm=2P.00/DN*
returns the full product name.
- searchType
- search.query.wildcard.analyzer = false
-
- searchType
1001
-
searchTerm=2P.00/DNs*
does not return the product name.searchTerm=2P.00/DN*
does not return the product name.
- searchType
1000
-
searchTerm=2P.00/DNs*
does not return the product name.searchTerm=2P.00/DN*
does not return the product name.
- searchType