Globalize+acts_as_ferret

Hey all,
I’m using acts_as_ferret and globalize. I stumbled upon that post on
google:
http://osdir.com/ml/lang.ruby.ferret.general/2007-01/msg00068.html

does anybody know if it’s included in the latest a_a_f or if it’s
planed to be? I can’t seem to find anything about it.

thanx in advance

Pat

Hi!

Saimon sent me a patch for this, but unfortunately I didn’t find the
time to integrate it back then. Afair he added an option that made aaf
use per-language index directories, depending on the language currently
set in globalize.

Now that I think of it, that might not always be what people want - i.e.
you lose the possibility to easily search across multiple languages.
Imho it would be sufficient to store the language of a record in a
field, and use that for filtering by language when needed. More
important is to use an analyzer that can handle the different
languages.

What exactly would you want to do with globalize and aaf?

Anyway, since aaf has undergone some serious refactoring since then the
patch won’t work anymore, but I uploaded the archive containing Saimon’s
version of aaf with the patch applied, and his patch to the Wiki. Find
it at http://projects.jkraemer.net/acts_as_ferret/wiki at the bottom of
the page.

cheers,
Jens

On Wed, Jun 06, 2007 at 03:32:26PM -0500, Patrick A. wrote:


Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk


Jens Krämer
webit! Gesellschaft für neue Medien mbH
Schnorrstraße 76 | 01069 Dresden
Telefon +49 351 46766-0 | Telefax +49 351 46766-66
[email protected] | www.webit.de

Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa

Hey Jens,
Thanks for the link.

What exactly would you want to do with globalize and aaf?

I have something like this:
class Shooting < ActiveRecord::Base
acts_as_ferret :fields => [:media_name,:media_name_es,:media_name_fr]

def media_name
return self.media.name
end
def media_name_fr
return self.media.name_fr
end
def media_name_es
return self.media.name_es
end
end

is there a better way to handle this?

Thanks in advance

Pat

On 6/7/07, Benjamin K. [email protected] wrote:

thats how i store language-specific fields as well … i got something
like
:title_de, :title_en and :content_de, :content_en

ok, thanx for the info Ben.

On 2007-06-07, at 4:45 PM, Patrick A. wrote:

Hey Jens,
Thanks for the link.

What exactly would you want to do with globalize and aaf?

I have something like this:
class Shooting < ActiveRecord::Base
acts_as_ferret :fields => [:media_name,:media_name_es,:media_name_fr]

thats how i store language-specific fields as well … i got something
like
:title_de, :title_en and :content_de, :content_en

Ben