|
Re: Stem Analyzer: msg#00040lang.ruby.ferret.general
On Thu, Dec 07, 2006 at 06:27:13AM +0100, Raymond O'connor wrote: > Well, you bring up another question I had. I was using a similar line > as yours above to call the stem analyzer and I always would get a parse > error. I even get a parse error when I paste your line in. I'm pretty > new to ruby, and I'm sure its something obvious but I can't get rid of > the parse error without removing the hash ticks such as > acts_as_ferret :fields => ["id", "name", "body"], :analyzer => > MyFunkyStemAnalyzer > When I do that, AAF never seems to call my analyzer. So I ended up > editing the AAF code and setting the analyzer option inside there and it > worked except I get the whole problem I stated above. correct syntax would be: acts_as_ferret( { :fields => [:id, :name, :body] }, :analyzer => MyFunkyStemAnalyzer.new) curly brackets are needed for the first options hash only, but may be placed around the second one (where the analyzer option belongs), too. the important thing to get over the parse error is to use () around the whole argument list. sorry, I think I forgot these subtle things when posing code in the past myself. Jens -- webit! Gesellschaft für neue Medien mbH www.webit.de Dipl.-Wirtschaftsingenieur Jens Krämer kraemer-jv+WEUQhfkc@xxxxxxxxxxxxxxxx Schnorrstraße 76 Tel +49 351 46766 0 D-01069 Dresden Fax +49 351 46766 66 |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: AAF - Stem Analyzer: 00040, Jens Kraemer |
|---|---|
| Next by Date: | Re: Stem Analyzer: 00040, Raymond O'connor |
| Previous by Thread: | Re: Stem Analyzeri: 00040, Borys Ivanow |
| Next by Thread: | Re: AAF - Stem Analyzer: 00040, Matt Schnitz |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |