Thanks Pat. The join and the multi parameter did the trick. Thanks! Roger
kl. 09:11:59 UTC+1 onsdag 19. mars 2014 skrev Pat Allan følgende: > > Hi Roger > > If no other attributes or fields are referring to the qualifications > association, you’ll need to specify it in your index definition to ensure > the join is present. Also, you’ll want to set :multi to true for the > attribute, to ensure it’s treated as an MVA. > > join qualifications > has ‘…SQL…’, :as => :qualifications, :type => :integer, :multi => true > > Hope this helps. > > — > Pat > > On 19 Mar 2014, at 12:36 am, Roger Kind Kristiansen > <[email protected]<javascript:>> > wrote: > > I've got the following attribute currently defined in my index, which I'm > trying to translate into an SQL version: > > has qualifications(:qualification_type_id), :as => :qualification_ids > > > But I can't for the life of me seem to understand how to do it. I'm > thinking the following example is the closest I've gotten, but I'm I'm > getting a 'missing FROM-clause entry for table "qualifications"' error > which I'm unsure how to resolve: > > has 'array_agg(qualifications."qualification_type_id")', :as => > :qualifications, :type => :integer > > > Anyone have any pointers? > > Thanks, > Roger > > -- > You received this message because you are subscribed to the Google Groups > "Thinking Sphinx" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] <javascript:>. > To post to this group, send email to [email protected]<javascript:> > . > Visit this group at http://groups.google.com/group/thinking-sphinx. > For more options, visit https://groups.google.com/d/optout. > > > -- You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/thinking-sphinx. For more options, visit https://groups.google.com/d/optout.
