My fault. Thinking Sphinx worked correctly. I just indexed (and
searched) not the right column of the associated model.

Govinda

On 28 Mrz., 17:48, beagile <[email protected]> wrote:
> Hi!
>
> I have the following model:
>
> class User < ActiveRecord::Base
>   has_many :user_speaks_languages, :dependent   => :destroy
>
>   define_index do
>     indexes username
>     has user_speaks_languages(:id), :as => :user_speaks_languages
>   end
> end
>
> When I search with the following command:
> User.search(:with => {:user_learns_languages=>"1819"}, :per_page => 1000)
> [1408]
>
> I only get one user back, but I would expect to get several users back who
> all speak this language.
> Why is that?
>
> My real user-model has more relations and more fields and attributes... and
> I can search on them just fine.
> But this index attribute seems not to work for me...
>
> Would be very happy if someone could help!
>
> Govinda

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