Sorry if this is already posted elsewhere in the group but I've
searched the mail group and found no solution to my situation with
has_many association in Thinking Sphinx.

Suppose a Post has many descriptions in many languages. I create two
table jobs and descriptions

posts (id, name)
descriptions(post_id, lang, description)

posts table:
Job  |    Name
---------------------------
1     |   Job One

descriptions table

Job  | lang  | description
-------------------------------------------
1     | "EN"  | this is the first line.... in English
1     | "FR"  | this is the second desc ... in French

I want to search for "any job whose EN description contains first". So
I perform a query like this:

Job.search "first", :with => {:langs => "EN"}  # this works, returned
the Job One

but, amazingly, if I do:

Job.search "first", :with => {:langs => "FR"}

Again, it returns the Job One while I have thought it should return
nothing!!!

Any one can explain why?

-- 
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.

Reply via email to