Solr Suggester BlendedInfixLookupFactory - Exact Match Problem

Viewed 11

I am using the Solr BlendedInfixLookupFactory suggester engine and have an issue.

When I get my result set, the exact match does not appear at the top and after much trial and error I cannot work out why.

Below is my solr config file.

    <searchComponent name="suggest_infix" class="solr.SuggestComponent">
   <lst name="suggester">
        <str name="name">mySuggesterInfix</str>
         <str name="lookupImpl">BlendedInfixLookupFactory</str>  
        <str name="dictionaryImpl">DocumentDictionaryFactory</str>
        <str name="field">prod_fullname_lower</str>
         <str name="weightField">prod_fullname_lower</str> 
         <str name="buildOnCommit">true</str>
        <str name="suggestAnalyzerFieldType">casField</str>
        <str name="buildOnStartup">true</str>
      <str name="buildOnCommit">true</str>
        <str name="highlight">false</str>
      </lst>
</searchComponent>   
http://127.0.0.1:8983/solr/main_core/suggest_infix?debugQuery=false&q.op=OR&q=Naringin

This is the result set that is returned. In what appears to be reverse order.

    {
  "responseHeader":{
    "status":0,
    "QTime":3},
  "suggest":{"mySuggesterInfix":{
      "Naringin":{
        "numFound":6,
        "suggestions":[{
            "term":"Naringin hydrate",
            "weight":10,
            "payload":""},
          {
            "term":"Naringin dihydrochalcone",
            "weight":10,
            "payload":""},
          {
            "term":"Naringin dihydrate",
            "weight":10,
            "payload":""},
          {
            "term":"Naringin chalcone",
            "weight":10,
            "payload":""},
          {
            "term":"Naringin 4'-O-glucoside",
            "weight":10,
            "payload":""},
          {
            "term":"Naringin",
            "weight":10,
            "payload":""}]}}}}

I appreciate any help.

0 Answers
Related