Just to confirm - are you finding your search doesn't reflect tag changes?
You'll need to fire off the delta change to your Tag model when a Tagging
object changes - have a look at the second section on this page (heading is
'Deltas and Associations'):
http://freelancing-god.github.com/ts/en/deltas.html
--
Pat
On 21/07/2012, at 1:20 AM, radosch wrote:
> Hi guys,
>
> may be somebody can help me out here:
>
> because I cannot combine AR scopes and Sphinx scopes I sort the list by the
> taggings count.
> When a tagging changes, it should actually influence the Tag List.
>
> Does anybody has a clue?
>
> Thanks a lot!
>
> Rafael
>
>
> tag.rb
>
> define_index do
> has "COUNT(taggings.id)", :as => :taggings_count, :type => :integer,
> :sortable => true
> join taggings
>
> indexes name, :sortable => true
> indexes description, :sortable => true
>
> set_property :field_weights => {
> :name => 70,
> :description => 5
> },
> :delta => true,
> :enable_star => 1
> end
>
>
>
> tags_controller.rb
>
> @tags = Tag.search(search_param,
> :retry_stale => true,
> :match_mode => :extended,
> :star => true,
> :order => 'taggings_count desc'
> ).
> page(params[:page]).per(28)
>
>
>
> --
> 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/-/eCKZRr-sTOQJ.
> 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.