Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-18254

Sorting error: Umlauts not sorted according to language rules

    Details

      Description

      When sorting search results alphabetically, umlauts are sorted after latin1 characters: X,Y,Z then x,y,z then Ä,Ö then ä,ö. Umlauts should be sorted according to language specific rules. German requires different sorting from Swedish, for example.

      Steps to reproduce
      • Apply the fix for #15423 and reindex
      • Create objects starting with latin1 characters and umlauts
      • Search for them, while sorting alphabetically: {set $search=fetch( ezfind, search, hash( query, $search_text, sort_by, hash( name, asc ) ) )}

        Activity

        (inactive) Gunnstein Lye created issue -
        Hide
        Patrick Allaert added a comment -

        It is not possible, until we use Solr 3.1 and the "sort by function" feature (http://wiki.apache.org/solr/FunctionQuery#Sort_By_Function), to provide true language rules sorting.

        What can be done is to latinize the sort field so that:
        "à" would be identical to "a"
        "è" to "e"
        "ö" to "o"
        ...
        So that we would have:

        • aaa
        • àbc
        • ade
        • bcd
        • éfg
        • ...
        • zyx

        instead of:

        • aaa
        • ade
        • bcd
        • ...
        • zyx
        • àbc
        • éfg

        However, this is not "knowing the language rules" as with collation.

        Show
        Patrick Allaert added a comment - It is not possible, until we use Solr 3.1 and the "sort by function" feature ( http://wiki.apache.org/solr/FunctionQuery#Sort_By_Function ), to provide true language rules sorting. What can be done is to latinize the sort field so that: "à" would be identical to "a" "è" to "e" "ö" to "o" ... So that we would have: aaa àbc ade bcd éfg ... zyx instead of: aaa ade bcd ... zyx àbc éfg However, this is not "knowing the language rules" as with collation.
        Hide
        Patrick Allaert added a comment -

        Fixed in:
        eZ Find 2.5: https://github.com/ezsystems/ezfind/commit/89bf03e93b9b33a2d89e5176b428a7f7e1abe421

        That fix cannot and will not be backported to eZ Find <= 2.4.
        This heavily relies on Solr 3.1

        Show
        Patrick Allaert added a comment - Fixed in: eZ Find 2.5: https://github.com/ezsystems/ezfind/commit/89bf03e93b9b33a2d89e5176b428a7f7e1abe421 That fix cannot and will not be backported to eZ Find <= 2.4. This heavily relies on Solr 3.1
        André Rømcke made changes -
        Field Original Value New Value
        Workflow eZ Community Workflow [ 32685 ] eZ Engineering Scrumban Workflow [ 47933 ]
        Bertrand Dunogier made changes -
        Component/s Extensions/eZ Find/Searching [ 10767 ]
        André Rømcke made changes -
        Workflow eZ Engineering Scrumban Workflow [ 47933 ] EZ* Development Workflow [ 82388 ]
        Alex Schuster made changes -
        Workflow EZ* Development Workflow [ 82388 ] EZEE Development Workflow [ 120968 ]

          People

          • Assignee:
            Patrick Allaert
            Reporter:
            (inactive) Gunnstein Lye
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: