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

Solr Spellcheck for words with apostrophe

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.5
    • None
    • spellchecker
    • None
    • All

    Description

      Solr Spellcheck incorrect for words with Apostrophe.

      http://10.224.64.10/solr5/select?q=pandora's star &spellcheck=true&spellcheck.collate=true&spellcheck.count=5

      The result is

      • <lst name="spellcheck">
      • <lst name="suggestions">
      • <lst name="pandora">
        <int name="numFound">2</int>
        <int name="startOffset">6</int>
        <int name="endOffset">13</int>
      • <arr name="suggestion">
        <str>pandora's</str>
        <str>sandra</str>
        </arr>
        </lst>
        <str name="collation">spell:pandora's's star</str>
        </lst>
        </lst>

      textSpell configuration in schema is as below

      <fieldType name="textSpell" class="solr.TextField" positionIncrementGap="100" omitNorms="true">
      <analyzer type="index">
      <tokenizer class="solr.WhitespaceTokenizerFactory"/>

      <!-- <tokenizer class="solr.StandardTokenizerFactory"/> -->
      <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_selma.txt"/>
      <filter class="solr.StandardFilterFactory"/>
      <filter class="solr.LowerCaseFilterFactory"/>
      <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
      </analyzer>
      <analyzer type="query">
      <tokenizer class="solr.WhitespaceTokenizerFactory"/>

      <!--<tokenizer class="solr.StandardTokenizerFactory"/> -->
      <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_selma.txt"/>
      <filter class="solr.StandardFilterFactory"/>
      <filter class="solr.LowerCaseFilterFactory"/>
      <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
      </analyzer>
      </fieldType>

      But the same when given in &spellcheck.q paramter , it works,
      http://10.224.64.10/solr5/select?q=spell:pandora's star&spellcheck=true&spellcheck.collate=true&spellcheck.q=pandora's star

      Attachments

        Activity

          People

            Unassigned Unassigned
            shrikanish Shri Kanishka
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: