Forum: Ferret globalize+acts_as_ferret

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
997433f165140d58f52b8c0d1d005dc1?d=identicon&s=25 Patrick Aljord (Guest)
on 2007-06-06 22:32
(Received via mailing list)
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-...

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
C9dd93aa135988cabf9183d3210665ca?d=identicon&s=25 Jens Kraemer (Guest)
on 2007-06-07 09:21
(Received via mailing list)
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 Aljord wrote:
> _______________________________________________
> Ferret-talk mailing list
> Ferret-talk@rubyforge.org
> 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
kraemer@webit.de | www.webit.de

Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa
997433f165140d58f52b8c0d1d005dc1?d=identicon&s=25 Patrick Aljord (Guest)
on 2007-06-07 16:46
(Received via mailing list)
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
D148c5959e4eccc97f33244f1c5396e9?d=identicon&s=25 Benjamin Krause (Guest)
on 2007-06-07 17:17
(Received via mailing list)
On 2007-06-07, at 4:45 PM, Patrick Aljord 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
997433f165140d58f52b8c0d1d005dc1?d=identicon&s=25 Patrick Aljord (Guest)
on 2007-06-07 18:43
(Received via mailing list)
On 6/7/07, Benjamin Krause <bk@benjaminkrause.com> 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.
This topic is locked and can not be replied to.