Forum: Rails I18n thinking sphinx && globalize2

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
561f6b93e60563dabb66fb9802d06fa3?d=identicon&s=25 Alexey Poimtsev (alec-c4)
on 2010-02-15 19:26
(Received via mailing list)
Hi all.
Could you tell me plz - how to integrate sphinx search with
globalize2? I'd like to perform search in models with translations.

Thanks a lot.
Clemens Kofler (Guest)
on 2010-02-15 22:47
(Received via mailing list)
Actually, it's way easier than you might think – you just use the
association as you would with other models, only with globalize2, the
association is always called "globalize_translations".

So if you have an article model with title and body being translated
and you want to index both, the index definition might look something
like the following:

define_index do
  index globalize_translations.title
  index globalize_translations.body

You can also somehow split indexes by locale so that when searching in
English you only get English translation – but I've never done that
and I'm not sure how to do that with (thinking) sphinx.

Sven Fuchs (Guest)
on 2010-02-15 22:55
(Received via mailing list)
except that with current master it's now #translations

561f6b93e60563dabb66fb9802d06fa3?d=identicon&s=25 Alexey Poimtsev (alec-c4)
on 2010-02-16 10:29
(Received via mailing list)
Thanks, guys!
This topic is locked and can not be replied to.