Ferret’s analyzer perform terribly support for multilingual .
thanks for the plugin multilingual_ferret_tools
Here is the description from it:
This plugin provides a multilingual-aware Analyzer for Ferret. This analyzer is useful when fields may contain characters from multiple languages. Fields are broken into latin parts and non-latin-parts- the latin parts are then processed with Ferret::Analysis::StandardAnalyzer, and the non-latin parts are processed with Ferret::Analysis::RegExpAnalyzer. By default, the RegExpAnalyzer used considers each character as a distinct token. If you want to change the configuration of the delegated analyzers, you'll find that initialization code in MultilingualFerretTools::Analyzer#token_stream_for.
http://svn.lingr.com/plugins/multilingual_ferret_tools/
to install thru piston, simply execute below :
piston import http://svn.lingr.com/plugins/multilingual_ferret_tools/ vender/plugins/multilingual_ferret_tools
To enable ,add analyzer parameter to acts_as_ferret :
acts_as_ferret (
{:fields => {
:name => { :boost => 2 },
:chinese_name => { :boost => 2 },
:self_description => { :boost => 1.5 },
:subtitle => {},
:teaching_time_remarks => {},
:description => {},
:extra_curriculums => {},
:job_description1 => {},
:job_description2 => {},
:primary_school => {},
:secondary_school => {},
:other_university => {},
:university_major => {},
:university_minors => {},
:professional_courses => {},
}},
{:analyzer => MultilingualFerretTools::Analyzer.new })
Related:
Leave a reply