Solr
  1. Solr
  2. SOLR-1094

spellcheck component, correctlySpelled is bogus!

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: 1.4
    • Component/s: None
    • Labels:
      None

      Description

      I've found that correctlySpelled is sometimes hidden and it is sometimes shown, and when it is shown it may indicate true when it should clearly be false. As such I've discounted it altogether. I should be fixed or removed. Here's a search query I ran against my index and I swear I don't have a termh "zzzwwwzzzzzz"

      <lst name="responseHeader">
       <int name="status">0</int>
       <int name="QTime">58</int>
       <lst name="params">
        <str name="spellcheck">true</str>
        <str name="rows">0</str>
        <str name="indent">on</str>
        <str name="echoParams">explicit</str>
        <str name="spellcheck.collate">true</str>
        <str name="spellcheck.extendedResults">true</str>
        <str name="q">zzzwwwzzzzzz</str>
        <str name="spellcheck.count">3</str>
        <str name="version">2.2</str>
       </lst>
      </lst>
      <result name="response" numFound="0" start="0"/>
      <lst name="spellcheck">
       <lst name="suggestions">
        <bool name="correctlySpelled">true</bool>
       </lst>
      </lst>
      </response>
      
      1. SOLR-1094.patch
        2 kB
        Mark Miller
      2. SOLR-1094.patch
        2 kB
        Mark Miller

        Activity

        Hide
        Anoop Atre added a comment -

        I've been running into the same exact roadblock, the difference is that we are using Solr 1.3.0. I assumed it was some error in my configuration and it could very well still be the reason no suggestions were returned.

        Here's the search query I ran and I'm pretty sure I don't have "heltl" in my index.
        > /search?q=heltl&spellcheck.q=heltl&spellcheck=true&spellcheck.extendedResults=true&indent=on&echoParams=explicit

        <response>
          <lst name="responseHeader">
          <int name="status">0</int>
          <int name="QTime">2</int>
            <lst name="params">
              <str name="spellcheck">true</str>
              <str name="spellcheck.q">heltl</str>
              <str name="indent">on</str>
              <str name="echoParams">explicit</str>
              <str name="spellcheck.extendedResults">true</str>
              <str name="q">heltl</str>
            </lst>
          </lst>
        <result name="response" numFound="0" start="0"/>
          <lst name="spellcheck">
            <lst name="suggestions">
            <bool name="correctlySpelled">true</bool>
            </lst>
          </lst>
        </response>
        

        Here are my messages to the mailing list, as indicated I've also tried adding a regular handler which didn't respond as expected, I believe that was the method recommended previously but described on the wiki (first link below) maybe those instructions are wrong?

        > http://wiki.apache.org/solr/SpellCheckComponent
        > http://mail-archives.apache.org/mod_mbox/lucene-solr-user/200903.mbox/%3C49D11672.4000209@mnsu.edu%3E
        > http://mail-archives.apache.org/mod_mbox/lucene-solr-user/200904.mbox/%3C49D65609.1050707@mnsu.edu%3E

        Show
        Anoop Atre added a comment - I've been running into the same exact roadblock, the difference is that we are using Solr 1.3.0. I assumed it was some error in my configuration and it could very well still be the reason no suggestions were returned. Here's the search query I ran and I'm pretty sure I don't have "heltl" in my index. > /search?q=heltl&spellcheck.q=heltl&spellcheck=true&spellcheck.extendedResults=true&indent=on&echoParams=explicit <response> <lst name= "responseHeader" > <int name= "status" > 0 </int> <int name= "QTime" > 2 </int> <lst name= "params" > <str name= "spellcheck" > true </str> <str name= "spellcheck.q" > heltl </str> <str name= "indent" > on </str> <str name= "echoParams" > explicit </str> <str name= "spellcheck.extendedResults" > true </str> <str name= "q" > heltl </str> </lst> </lst> <result name= "response" numFound= "0" start= "0" /> <lst name= "spellcheck" > <lst name= "suggestions" > <bool name= "correctlySpelled" > true </bool> </lst> </lst> </response> Here are my messages to the mailing list, as indicated I've also tried adding a regular handler which didn't respond as expected, I believe that was the method recommended previously but described on the wiki (first link below) maybe those instructions are wrong? > http://wiki.apache.org/solr/SpellCheckComponent > http://mail-archives.apache.org/mod_mbox/lucene-solr-user/200903.mbox/%3C49D11672.4000209@mnsu.edu%3E > http://mail-archives.apache.org/mod_mbox/lucene-solr-user/200904.mbox/%3C49D65609.1050707@mnsu.edu%3E
        Hide
        Shalin Shekhar Mangar added a comment -

        This must be fixed in 1.4

        Show
        Shalin Shekhar Mangar added a comment - This must be fixed in 1.4
        Hide
        Anoop Atre added a comment -

        Shalin, I saw the "Fix Version/s: 1.4" right after I added the comment : ) Do we have a time line for a 1.4 final release? Thanks!

        Show
        Anoop Atre added a comment - Shalin, I saw the "Fix Version/s: 1.4" right after I added the comment : ) Do we have a time line for a 1.4 final release? Thanks!
        Hide
        Mark Miller added a comment -

        test + fix

        Show
        Mark Miller added a comment - test + fix
        Hide
        Shalin Shekhar Mangar added a comment -

        Committed revision 769310.

        Thanks David and Mark!

        Show
        Shalin Shekhar Mangar added a comment - Committed revision 769310. Thanks David and Mark!
        Hide
        Mark Miller added a comment -

        Still something slightly off here - if the word is correct and there are no suggestions, it does not say correctly spelled. No freq info is added, so correctly spelled is skipped. Simple enough, but still looking for the right way to address it.

        The last patch just addressed when a single word not from the index was incorrectly marked as correctly spelled.

        Show
        Mark Miller added a comment - Still something slightly off here - if the word is correct and there are no suggestions, it does not say correctly spelled. No freq info is added, so correctly spelled is skipped. Simple enough, but still looking for the right way to address it. The last patch just addressed when a single word not from the index was incorrectly marked as correctly spelled.
        Hide
        Mark Miller added a comment -

        another test and another fix - a single correctly spelled word will come back with correctlySpelled = true

        Show
        Mark Miller added a comment - another test and another fix - a single correctly spelled word will come back with correctlySpelled = true
        Hide
        Shalin Shekhar Mangar added a comment -

        Committed revision 769357.

        Thanks Mark!

        Show
        Shalin Shekhar Mangar added a comment - Committed revision 769357. Thanks Mark!
        Hide
        Grant Ingersoll added a comment -

        Bulk close for Solr 1.4

        Show
        Grant Ingersoll added a comment - Bulk close for Solr 1.4

          People

          • Assignee:
            Shalin Shekhar Mangar
            Reporter:
            David Smiley
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development