Great to know it's working :)
On 08/12/2012, at 4:12 PM, Mike C. wrote:
> My bad...I deciphered the part you mentioned "and the join table aliases may
> be something other than positive_votes and negative_votes" by checking out
> the development.sphinx config file. They were labeled as
> positive_votes_people and negative_votes_people. So the define index became
> thus:
>
> has "CAST(COUNT(DISTINCT positive_votes_people.id) - COUNT(DISTINCT
> negative_votes_people.id) as float)", :as => :rating, :type => :float
> join positive_votes
> join negative_votes
>
> and Voila, it works perfect!
>
> Thanks so much Pat, you are the best!
>
> On Friday, December 7, 2012 11:49:44 PM UTC-5, Mike C. wrote:
> You're right! It appears the culprit is "indexes tag_taggings.tag(:name), as:
> :tags". When I remove this attribute from the index the ratings work perfect.
> Although I need the tags as part of the search...
>
> I tried adding like you said:
>
> has_many :positive_votes, :class_name => 'Vote', :foreign_key =>
> 'voteable_id', :conditions => {:vote => true}
> has_many :negative_votes, :class_name => 'Vote', :foreign_key =>
> 'voteable_id', :conditions => {:vote => false}
>
> define index
> has "CAST(COUNT(DISTINCT positive_votes.id) - COUNT(DISTINCT
> negative_votes.id)) as float", :as => :rating, :type => :float
> join positive_votes
> join negative_votes
> end
>
> but I keep getting an issue like:
>
>
>
>
>
>
> OR
>
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Thinking Sphinx" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/thinking-sphinx/-/0JjKshHjjoUJ.
> 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.