>
> Perhaps as an alternative, you can add a WHERE clause (via the `where` 
> method in the index definition) to filter out records with NULL values from 
> the other side of the OUTER join? Not sure if that’ll be the same outcome 
> though.


Yep that's what I'm going to do.  Thanks!

On Thursday, May 1, 2014 4:44:51 AM UTC-7, Pat Allan wrote:
>
> Hi Ngan
>
> I don’t think this is currently possible with TS v2, I’m afraid.
>
> With v3, you can specify custom SQL strings with the `join` method inside 
> an index definition, so it’s definitely possible there, but TS v2 doesn’t 
> have that ability.
>
> Perhaps as an alternative, you can add a WHERE clause (via the `where` 
> method in the index definition) to filter out records with NULL values from 
> the other side of the OUTER join? Not sure if that’ll be the same outcome 
> though.
>
> — 
> Pat
>
> On 30 Apr 2014, at 1:02 am, Ngan <[email protected] <javascript:>> wrote:
>
> Hi Pat,
>
> I'm on TS 2.x.  Was wondering if there's a way to define an index with an 
> LEFT INNER JOIN instead of the default OUTER join?  Basically I'd like to 
> index a model's db row IFF there is a corresponding join table row and that 
> join table row must have a column that is a certain value.  In regular sql, 
> it'd be:
>
> SELECT * FROM table1 LEFT INNER JOIN table2 ON table2.table1_id = 
> table1.id WHERE table2.col1 IS NOT NULL;
>
> Thanks,
> Ngan
>
> -- 
> 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.

Reply via email to