Hi Benjamin

I've covered the join issue in another thread, but essentially, just use the 
'join' method in a define_index block:

  join association
  join association.inner_association

It will work as deep as you like.

As for modifying the GROUP BY, that's done by the group_by method:

  group_by 'table.column_a', 'table.column_b'

Does this cover all of your requirements?

Cheers

-- 
Pat

On 05/02/2011, at 9:12 AM, Benjamin Moses Lieb wrote:

> Is there any way I can control what tables are listed in the FROM
> clause and exactly what is put in the GROUP BY?
> 
> I'm trying to use :
> 
> has "COUNT(non_referenced_table.col)"
> 
> but it doesn't work because the table is not listed in the FROM. When
> I put in this shim to try to force the table in the FROM:
> 
> indexes non_referenced_table(:col), :as => shim
> 
> the new column and new GROUP BY cause the COUNT to be wrong. What I
> need is proper control over the FROM and GROUP BY (I realize I can add
> to the group_by, but I want to set it explicily).
> 
> Unfortunately, without this ability, I'm afraid TS just isn't very
> useful to me.
> 
> Any way to do this, or perhaps is there another solution?
> 
> -- 
> 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.
> 

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