You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Pavithra Dhakshinamurthy (JIRA)" <ji...@apache.org> on 2018/01/11 10:13:00 UTC

[jira] [Created] (SOLR-11844) Sort suggestions in solr based on the position of keyword

Pavithra Dhakshinamurthy created SOLR-11844:
-----------------------------------------------

             Summary: Sort suggestions in solr based on the position of keyword
                 Key: SOLR-11844
                 URL: https://issues.apache.org/jira/browse/SOLR-11844
             Project: Solr
          Issue Type: Bug
      Security Level: Public (Default Security Level. Issues are Public)
          Components: Suggester
            Reporter: Pavithra Dhakshinamurthy
            Priority: Minor


I am using Suggest component in solr 6.5 version. I have configured BlendidInfixLookupFactory to sort suggestions based on the search keyword. 

Below is my current configuration:


    <searchComponent name="suggest" class="solr.SuggestComponent">
        <lst name="suggester">
          <str name="name">mySuggester</str>
          <str name="lookupImpl">BlendedInfixLookupFactory</str>
    	  <str name="dictionaryImpl">DocumentDictionaryFactory</str>   
          <str name="field">title</str>
    	  <str name="suggestAnalyzerFieldType">text_general</str>
    	  <str name="blenderType">position_linear</str>
    	  <str name="numFactor">20</str>
    	</lst>
      </searchComponent>
      
      <requestHandler name="/suggest" class="solr.SearchHandler" startup="lazy">
        <lst name="defaults">
          <str name="suggest">true</str>
          <str name="suggest.count">10</str>
        </lst>
        <arr name="components">
          <str>suggest</str>
        </arr>
      </requestHandler> 

But it is not sorting based on the position of keyword and it is returning in random order and not sure what order is being followed. As per solr documentation, it should sort based on the position, but it is not working in that order. 

For Example: My search keyword is blue,
My Expected results: blue, blue whale, blue water, sky blue
Actual results: sky blue, blue whale, blue water, blue



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org