I'm trying to enable phrase suggestion in my application by using
*AnalyzingInfixLookupFactory *and *DocumentDictionaryFactory*. Following is
what my configuration looks like:

<searchComponent name="suggest" class="solr.SuggestComponent">
  <lst name="suggester">
    <str name="name">mySuggester</str>
      <str name="lookupImpl">AnalyzingInfixLookupFactory</str>
      <str name=”indexPath”>suggester_infix_dir</str>
    <str name="dictionaryImpl">DocumentDictionaryFactory</str>
    <str name="field">title</str>
    <str name="suggestAnalyzerFieldType">suggestType</str>
    <str name="buildOnStartup">false</str>
    <str name="buildOnCommit">false</str>
  </lst>
</searchComponent>
<requestHandler name="/suggesthandler" class="solr.SearchHandler"
startup="lazy" >
  <lst name="defaults">
    <str name="suggest">true</str>
    <str name="suggest.count">10</str>
    <str name="suggest.dictionary">mySuggester</str>
  </lst>
  <arr name="components">
    <str>suggest</str>
  </arr>
</requestHandler>

I have following documents indexed:

<doc>
<field name="id">44</field>
<field name="title"></field>
</doc>

<doc>
<field name="id">11</field>
<field name="title">Video gaming: the history</field>
</doc>
<doc>

<field name="id">55</field>
<field name="title">Video games: multiplayer gaming</field>
</doc>

<doc>
<field name="id">33</field>
<field name="title">Video gaming: the history</field>
</doc>

After indexing documents and building the suggester, when I query I get
duplicate suggestions

q.suggest=video
returns
[
      {
        "id":"44",
        "*title":"Video gaming: the history"},*
      {
        "id":"33",
        "title":"Video games: multiplayer gaming"},
      {
        "id":"44",
        *"title":"Video gaming: the history"}]*

Is this a known bug with Solr suggester? shouldn't suggester by default
return unique suggestions?


Thanks



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

Reply via email to