Hi I have done similar.. I ended up putting
where 'taxons.taxonomy_id is null or taxons.taxonomy_id = 1' This prevents the delimiting of any entries without the taxon join.. I am not sure if there is a better way though Kind Regards Chris Rode On 21 April 2010 14:03, Kpitn <[email protected]> wrote: > Hi, > > I want to do something like this en index definitions : > > define_index do > indexes taxons.name, :as => :product_taxon, :facet => > true, :conditions => { :taxonomy_id => 1 } > end > > This thing could be translate into this : > > LEFT OUTER JOIN `taxons` ON (`taxons`.id = `products_taxons`.taxon_id > AND taxonomy_id=1 ) > > Is this possible ? > > Actually i make this to work : > define_index do > indexes taxons.name, :as => :product_taxon, :facet => true > where "taxons.taxonomy_id=1" > end > > But If a product don't have taxon the product is missing ... > > -- > 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]<thinking-sphinx%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/thinking-sphinx?hl=en. > > -- 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.
