jamesmk
jamesmk

Reputation: 98

Searching special characters with solr and sunspot-rails

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.

Upvotes: 0

Views: 858

Answers (1)

d whelan
d whelan

Reputation: 804

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

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

Upvotes: 1

Related Questions