Question

I have sunspot-rails setup on a Rails 3.1 app. I was wondering if there's a way to map normal characters to special characters automatically when sunspot searches the solr index?

For example: if a user searches "cafe", they will also see results for "café".

Any help would be appreciated.

Was it helpful?

Solution

You could accomplish that by adding the AsciiFoldingFilter to your field for indexing/query

http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.ASCIIFoldingFilterFactory

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top