I was surprised to see duplicate suggestions coming from my 4.10.4 suggester. 
This is analyzing infix with terms loaded from the index.

"titles_infix": {
"chemistry": {
"numFound": 10,
"suggestions": [
{
"term": "<b>Chemistry</b>",
"weight": 5285,
"payload": ""
},
{
"term": "<b>Chemistry</b>",
"weight": 4548,
"payload": ""
},
{
"term": "<b>Chemistry</b>",
"weight": 3002,
"payload": ""
},
{
"term": "Introductory <b>Chemistry</b>",
"weight": 2823,
"payload": ""
},


wunder
Walter Underwood
wun...@wunderwood.org
http://observer.wunderwood.org/  (my blog)


> On Jul 19, 2017, at 3:33 AM, Zheng Lin Edwin Yeo <edwinye...@gmail.com> wrote:
> 
> Hi,
> 
> Is there any configuration that we can set for the /suggest handler, so
> that the suggestion output will only return unique records, and not
> duplicated?
> 
> Below is my /suggest handler.
> 
>  <requestHandler name="/suggest" class="solr.SearchHandler">
> <lst name="defaults">
> <str name="echoParams">all</str>
>   <str name="wt">json</str>
>   <str name="indent">true</str>
> <str name="df">content</str>
> <str name="rows">100</str>
> <str name="fl">id, score</str>
>  <str name="hl">on</str>
>  <str name="hl.fl">content</str>
>  <str name="hl.highlightMultiTerm">true</str>
>  <str name="hl.preserveMulti">false</str>
>  <str name="hl.encoder">html</str>
>  <str name="hl.fragsize">100</str>
>    <str name="hl.maxAnalyzedChars">204800</str>
>  <str name="hl.usePhraseHighlighter">true</str>
> </lst>
> 
> Regards,
> Edwin

Reply via email to