I have a set of problems with sunspot and enconding issues when sorting.
The main problem is the use of brazilian words with accents. For example, for a set of names as:
- Alberto
- Ana
- Maria
- Álvaro
The name Álvaro, always appears on the end of the list after call order_by method.
This is my class setting for the column name:
class Student < ActiveRecord::Base
searchable do
text(:name)
text(:code)
string :name_sort do
name
end
end
def search(options)
students = Student.search do
fulltext(options[:data])
order_by :name_sort
end
students.results
end
end
Can Anyone help?
Thanks
Luiz
you could try using transliterate when indexing