You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by eyun <ey...@microrapid.com> on 2012/11/12 04:36:22 UTC
Re: how to sort the solr suggester's result
anyone can help to tell me where is my mistake?
eyun
From: eyun
Date: 2012-11-12 11:24
To: solr-user-subscribe
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
Re: how to sort the solr suggester's result
Posted by akhilendrajha <ak...@gmail.com>.
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