Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Not a Problem
    • Affects Version/s: 3.3
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      There is a sorting issue with solr 3.3.
      Other versions currently not tested.

      If solr.PatternReplaceFilterFactory of fieldType "alphaOnlySort" is changed from pattern="([^a-z])"
      to pattern="([\x01-\x2F\x3A-\x40\x5B-\x60\x7B-\x7F])" then sorting returns wrong order of results.

      According to documentation the sorting should be UTF-8 compatible.

      1. sort_example.xml
        0.4 kB
        Bernd Fehling

        Activity

        Hide
        Yonik Seeley added a comment -

        Whew, thanks for getting to the bottom of this!

        Show
        Yonik Seeley added a comment - Whew, thanks for getting to the bottom of this!
        Hide
        Bernd Fehling added a comment -

        OK, after using debugger it turned out that there was a BOM at one line.
        Naturally for sorting in descending order according to UTF-8 this line comes first.
        So, nothing to fix, working as expected.

        Show
        Bernd Fehling added a comment - OK, after using debugger it turned out that there was a BOM at one line. Naturally for sorting in descending order according to UTF-8 this line comes first. So, nothing to fix, working as expected.
        Hide
        Bernd Fehling added a comment -

        If solr.PatternReplaceFilterFactory uses the default pattern="([^a-z])", which is more restrictive,
        then sorting works. But I can't find any special values in the loaded example docs which are not
        filtered with my pattern.

        Show
        Bernd Fehling added a comment - If solr.PatternReplaceFilterFactory uses the default pattern="( [^a-z] )", which is more restrictive, then sorting works. But I can't find any special values in the loaded example docs which are not filtered with my pattern.
        Hide
        Bernd Fehling added a comment -

        I have attached a test.
        Use the solr example:

        • change fieldType "alphaOnlySort" to pattern="([\x01-\x2F\x3A-\x40\x5B-\x60\x7B-\x7F]])" in schema.xml
        • start solr example with "java -jar start.jar"
        • place attached file in exampledocs directory
        • load docs with "./post.sh sort_example.xml"

        Search for:
        http://localhost:8983/solr/select?q=*%3A*&fsv=true&sort=alphaNameSort+desc&version=2.2&start=0&rows=10&indent=on

        The result is not ordered in descending order.

        Show
        Bernd Fehling added a comment - I have attached a test. Use the solr example: change fieldType "alphaOnlySort" to pattern="( [\x01-\x2F\x3A-\x40\x5B-\x60\x7B-\x7F] ])" in schema.xml start solr example with "java -jar start.jar" place attached file in exampledocs directory load docs with "./post.sh sort_example.xml" Search for: http://localhost:8983/solr/select?q=*%3A*&fsv=true&sort=alphaNameSort+desc&version=2.2&start=0&rows=10&indent=on The result is not ordered in descending order.

          People

          • Assignee:
            Unassigned
            Reporter:
            Bernd Fehling
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development