Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9637

Duplicate suggestion result in SolrCloud

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.9.1
    • None
    • Suggester
    • Windows 7 Enterprise, 64 bit OS

    Description

      Hi,
      I am currently trying solr.SuggestComponent with SolrCloud with 2 shards. Here's my suggester component configuration:

         <searchComponent name="suggest" class="solr.SuggestComponent">
            <lst name="suggester">
               <str name="name">fuzzySuggester</str>
               <str name="lookupImpl">FuzzyLookupFactory</str>
               <str name="storeDir">fuzzy_suggestions</str>
               <str name="suggestAnalyzerFieldType">text_general</str>
               <str name="field">name</str>
            </lst>
            <lst name="suggester">
               <str name="name">basicSuggester</str>
               <str name="lookupImpl">TSTLookupFactory</str>
               <str name="storeDir">basic_tst_suggestions</str>
               <str name="field">name</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>
               <str name="suggest.dictionary">basicSuggester</str>
               <str name="suggest.dictionary">fuzzySuggester</str>
            </lst>
            <arr name="components">
               <str>suggest</str>
            </arr>
         </requestHandler>
      

      When I try to search for suggestion using this way
      http://localhost:8983/solr/suggest?q=t&shards.qt=/suggest&suggest.build=true

      I get this result

      <response>
         <lst name="responseHeader">
            <int name="status">0</int>
            <int name="QTime">200</int>
         </lst>
         <str name="command">build</str>
         <lst name="suggest">
            <lst name="basicSuggester">
               <lst name="t">
                  <int name="numFound">4</int>
                  <arr name="suggestions">
                     <lst>
                        <str name="term">tft</str>
                        <long name="weight">1</long>
                        <str name="payload" />
                     </lst>
                     <lst>
                        <str name="term">test</str>
                        <long name="weight">1</long>
                        <str name="payload" />
                     </lst>
                     <lst>
                        <str name="term">the</str>
                        <long name="weight">1</long>
                        <str name="payload" />
                     </lst>
                     <lst>
                        <str name="term">test</str>
                        <long name="weight">1</long>
                        <str name="payload" />
                     </lst>
                  </arr>
               </lst>
            </lst>
            <lst name="fuzzySuggester">
               <lst name="t">
                  <int name="numFound">4</int>
                  <arr name="suggestions">
                     <lst>
                        <str name="term">test</str>
                        <long name="weight">1</long>
                        <str name="payload" />
                     </lst>
                     <lst>
                        <str name="term">tft</str>
                        <long name="weight">1</long>
                        <str name="payload" />
                     </lst>
                     <lst>
                        <str name="term">the</str>
                        <long name="weight">1</long>
                        <str name="payload" />
                     </lst>
                     <lst>
                        <str name="term">test</str>
                        <long name="weight">1</long>
                        <str name="payload" />
                     </lst>
                  </arr>
               </lst>
            </lst>
         </lst>
      </response>
      

      As can be seen above, the result test is duplicate. How to make this single result? I've been trying to look for the workaround or fix in this Jira and elsewhere in the internet, so far no luck.

      Attachments

        Activity

          People

            Unassigned Unassigned
            muhridwan ridwan
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: