Search french via Thinking Sphinx in ROR project

Posted by Daniel on Stack Overflow See other posts from Stack Overflow or by Daniel
Published on 2010-03-21T08:02:43Z Indexed on 2010/03/21 8:11 UTC
Read the original article Hit count: 618

Hello everyone:

How can I use sphinx to search french words which the entries in the db is actually english?

The situation is:

I have a ROR project with a table in the db called "categories", and the category names are in english, category has many "question" entries.

In localization file config/locals/fr.yml, these categories were translated to french.

Consider about expandability, we can't change the category names in the db to french.

User can search by type part of the key word.

Here is a example: Category Name: Health and Medical In french: Santé et médecine

so how can I do this: type "Santé médecine abc" in the search field and sphinx will return the "questions" under "Health and Medical" category and have keyword "abc"?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about thinking-sphinx