Oracle Endeca Commerce DidYouMean

  1. Home
  2. Blog
  3. Oracle Endeca Commerce DidYouMean

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());
                 }
             }
         }
1 2 3 20
Let's Share
Show Buttons
Hide Buttons