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

case-insensitive sorting not working as intended.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • 4.10.3
    • None
    • None

    Description

      Hi,

      Right now when I perform a sort I am getting result as following:

      "[\"18 hotfix3\"]"
      "[\"Godzilla\"]"
      "[\"Godzilla, King of the Monsters!\"]"
      "[\"Harry Potter and the Sorcerers Stone\"]"
      "[\"How to Train Your Dragon\"]"
      "[\"Jurassic Park\"]"
      "[\"My Big Fat Greek Wedding\"]"
      "[\"National Treasure\"]"
      "[\"Palmer\"]"
      "[\"Patch Adams\"]"
      "[\"Rajan\"]"
      "[\"Sanity\"]"
      "[\"Stardust\"]"
      "[\"Superman\"]"
      "[\"The Amazing Spider-Man 2\"]"
      "[\"The Godfather\"]"
      "[\"The Lord of the Rings: The Fellowship of the Ring\"]"
      "[\"The Matrix\"]"
      "[\"V for Vendetta\"]"
      "[\"abcdefgh\"]"
      "[\"autoui1466571231695\"]"
      "[\"autoui1466605339320\"]"
      "[\"name\"]"
      "[\"test\"]"
      "[\"test2\"]"

      The field type has been defined as follows :

      <fieldType class="org.apache.solr.schema.TextField" name="TextField" sortMissingLast="true">
      <analyzer>
      <tokenizer class="solr.KeywordTokenizerFactory"/>
      <!-- lower case everything -->
      <filter class="solr.LowerCaseFilterFactory"/>
      <!-- remove lead/trail whitespace -->
      <filter class="solr.TrimFilterFactory"/>
      <!-- pad and trim numbers to an even 6 digits with leading 0's -->
      <filter class="solr.PatternReplaceFilterFactory"
      pattern="(\d+)" replacement="00000$1" replace="all"/>
      <filter class="solr.PatternReplaceFilterFactory"
      pattern="0*([0-9]

      {6,}

      )" replacement="$1" replace="all" />

      </analyzer>
      </fieldType>

      And for sorting purpose we have a dynamic field in place that used the above field type
      <!-- fields for sorting -->
      <dynamicField indexed="true" multiValued="false" name="sort_str*" stored="false" type="SortTextField"/>

      Attachments

        Activity

          People

            Unassigned Unassigned
            satishchennupati@hotmail.com satish chennupati
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: