Oracle Endeca Commerce DidYouMean
“Did you mean?” functionality allows an application to provide site user with explicit alternative suggestions for a keyword search. For example, if a user searches for “lapto” in sample data, user will get few results. The terms “laptop” and “laptops” however, are much more prevalent. When this feature is enabled, MDEX Engine will respond with the few results for “lapto”, but will also suggest that “laptop”or “laptops” may be what user actually intended. If multiple suggestions are returned, they will be sorted and presented according to the closeness of the match. We only want MDEX engine to complete correction when there is a high degree of confidence. For more aggressive suggestions, it is best to use “Did you mean?”
We can enable DYM feature by setting dgraph flag “–dym”
<dgraph-defaults> <properties> ... </properties> <directories> ... </directories> <args> <arg>--threads</arg> <arg>2</arg> <arg>--spl</arg> <arg>--dym</arg> </args> <startup-timeout>120</startup-timeout> </dgraph-defaults>
| Flag | Details |
| –dym | Enable DYM (Did You Mean?) explicit query spelling suggestions for full-text search queries. |
| –dym_hthresh | Specify the threshold number of hits at or above which DYM (Did You Mean?) suggestions will not be generated. The default is 20. |
| –dym_nsug | Specify the maximum number of DYM (Did You Mean?) query suggestions to return for any query. The default is 1. |
| –dym_sthresh | Specify the threshold spelling correction score for words used by the DYM (Did You Mean?) engine. The default is 175. |
In addition to set –dym MDEX Engine flag, please ensure that front end application is using the Nty=1 URL query parameter.For example: controller.jsp?N=0&Ntk=All&Ntt=product&Nty=1
Setting Nty=0 or omitting the Nty parameter prevents “Did you mean” results from being returned.
Presentation API’s for getting DYMSuggestions
List<String> listDYM = new ArrayList<String>();
Map<String, List<ESearchReport>> searchReportMap = navigation.getESearchReportsComplete();
for(String key : searchReportMap.keySet()){
final List<ESearchReport> searchReports = searchReportMap.get(key);
for(final ESearchReport searchReport : searchReports){
final List<ESearchDYMSuggestion> eSearchDYMSuggestions = searchReport.getDYMSuggestions();
for(ESearchDYMSuggestion eSearchDYMSuggestion : eSearchDYMSuggestions){
listDYM.add(eSearchDYMSuggestion.getTerms());
}
}
}
Menu to Food Tour: 5 AI Agents That Turn Any Restaurant Menu Into a Culinary Adventure
What if you could point your phone at a restaurant menu in…CCAT Chapter 1: Introduction to Claude Code Agent Teams
Learning Objectives By the end of this chapter, you will: What is…Orchestrating Claude Code Agent Teams CCAT
Learn AI Using AI [LAUA] This comprehensive educational guide details the functionality…Connect kubernetes pod to a GCS bucket using JS
To connect from a Kubernetes pod to a Google Cloud Storage (GCS)…