That's a tricky one - as all the Sphinx indexing is done before the user ever touches the website - if you could index all relevant languages, that would be the easiest approach. Beyond that, I'm not sure... if you could somehow construct fields with all the text for each language (ie, an English field, a German field, etc), then I guess you could limit queries against one of those fields.
No solution's going to be elegant, I'm afraid. -- Pat On 07/03/2009, at 12:30 AM, ACTRAiSER wrote: > > Hi, > > has anyone of you tried to integrate TS with Models translated via > Globalize2? > > The thing is, that for example i have a Adress-Model which has a > state_id and country_id as they are associated to the State- and > Country- Models. > > Those two Models are globalized which means they have a cooresponding > country_translations and state_translations table where there are > columns "locale" and "name" which are fetched depending on the > curren_user's set locale. > > So the problem is now, how do i have to setup my Adress-Index- > Attributes to find the correct address when the user enters for > example "Deutschland" in the search form to find all german Addresses? > > Right now (as i dont know the answer, i do a really quirky workaround: > prior search i check via a normal activerecord-find-call if the search > term can be found in one of the translated models and if so, i fetch > the model-id. With the model id i can then start the Sphinx-Search. > But it would be somehow less painful if i can index the translated > fields in sphinx in the first place. > > Long story short, any suggestions, best practise? :-) > > Greets > -act > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en -~----------~----~----~----~------~----~------~--~---
