eZ Community » Forums » eZ Publish 5 Platform » Accents in eZ Find
expandshrink

Accents in eZ Find

Accents in eZ Find

Wednesday 13 August 2014 12:36:43 pm - 6 replies

Hello, 

I work on a project eZ 5, and I've set up eZ Find.

The search works fine, but I have a problem with the results sorted by name with accents. 

In a set of results, if an answer begins with an accent in the first letter of the name, it is found not sorted (bottom of the list of results). 

Do you know how to enable eZ Find to consider accents for sorting?

Thank you in advanced.

Monday 15 September 2014 11:47:05 am

Nobody can help me?

Monday 15 September 2014 7:23:59 pm

Which language are you using? Maybe you should set up your solr's config with proper language settings (useful also for stemming etc)

Note: collation, ak.a. sort-order is language dependent, there is no such thing as universal-sorting-based-on-utf8-codepoints

Modified on Monday 15 September 2014 7:24:58 pm by Gaetano Giunta

Monday 15 September 2014 8:35:26 pm

I had this similar thing with a spanish site and here's what i finally did. 

I modified schema.xml in order to define a new fieldtype to deal with this spanish order issues like this

then, add a new field for the docs having the sorting field, being this field of this new stype. let's suppose we're sorting by a field called name

And finally just copy the original field to this new one

Reindex your content and you should be able to change your ezfind queries to have something like 

'sort_by', hash( 'nameSPANISH', 'asc' )

Ref: http://solr.pl/en/2011/04/11/car-...-in-a-language-sensitive-way-part-4/

Tuesday 16 September 2014 6:37:05 pm

Carlos thank you for your detailed response.

Unfortunately, it does not work better.

I use the French language (with words like: Évaluer).

Do you have another idea?

Tuesday 16 September 2014 9:19:08 pm

Sorry, can't say. worked for me and spanish and, yes, we have words like "Épico" or "lápiz"

Wednesday 17 September 2014 10:03:11 am

I just found my mistake. I did not sort out the good attribute in the copyField.

Carlos, your solution works well.

Thank you for your help.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from