Re: how to sort the solr suggester's result

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: how to sort the solr suggester's result

eyun
anyone can help to tell me where is my mistake?
 

eyun
 
Date: 2012-11-12 11:24
Subject: how to sort the solr suggester's result
following is my config , it suggests words well .  
i want to get a sorted result when it suggest, so i added a transformer , it will add a tab(\t) separated float weight string
to the end of the Suggestion field , but the suggestion result still does't sorted correctly.
 
my suggest result( note the red rectangle is the weight)
 
 
 
 
 
schema.xml
 
<field name="Suggestion" type="string" indexed="true" stored="true"/>
 
 
 
solrconfig.xml
 
 <searchComponent class="solr.SpellCheckComponent" name="suggest">
        <lst name="spellchecker">
            <str name="name">suggest</str>
            <str name="field">Suggestion</str>
            <str name="classname">org.apache.solr.spelling.suggest.Suggester</str>
            <str name="lookupImpl">org.apache.solr.spelling.suggest.tst.TSTLookup</str>   
            <!-- <float name="threshold">0.0001</float> -->
            <str name="spellcheckIndexDir">spellchecker</str>
            <str name="comparatorClass">freq</str>
            <str name="buildOnCommit">true</str>
                     
        </lst>
    </searchComponent>
    <requestHandler class="org.apache.solr.handler.component.SearchHandler"
                    name="/suggest">
        <lst name="defaults">
            <str name="spellcheck">true</str>
            <str name="spellcheck.dictionary">suggest</str>
            <str name="spellcheck.count">10</str>
            <str name="spellcheck.onlyMorePopular">true</str>  
            <str name="spellcheck.collate">true</str>                      
        </lst>
        <arr name="components">
            <str>suggest</str>
        </arr>
    </requestHandler>
 

eyun
Reply | Threaded
Open this post in threaded view
|

Re: how to sort the solr suggester's result

akhilendrajha
Even i want to do the same thing.
How did you do it?



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html