Accent insensitive searches

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Accent insensitive searches

mahernandez
Hello.

Is there a way to do accent insensitive searches with Searchable? I guess it have something to do with the analyzer and queryParser options, but I haven't found how to do it.

Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: Accent insensitive searches

pledbrook
Administrator
> Is there a way to do accent insensitive searches with Searchable? I guess it
> have something to do with the analyzer and queryParser options, but I
> haven't found how to do it.

I'm not familiar with the inner working of Compass and Lucene, but I
suggest you start with this page:

    http://grails.org/Searchable+Plugin+-+Analyzers

From there, it looks like the best approach may be to configure a
filter provider and register it for the standard analyzer:

    http://www.compass-project.org/docs/2.1.0/reference/html/core-settings.html#core-configuration-searchengineanalyzers

Lucene itself provides two filters that will probably interest you:

    http://lucene.apache.org/java/3_0_1/api/core/index.html?org/apache/lucene/analysis/ASCIIFoldingFilter.html
    http://lucene.apache.org/java/3_0_1/api/core/index.html?org/apache/lucene/analysis/ISOLatin1AccentFilter.html

Hope that helps,

Peter

--
Peter Ledbrook
Grails Advocate
SpringSource - A Division of VMware