For any future readers, here is an example of what is working for me
regarding acts_as_taggable_on and thinking_sphinx:

class Advert < ActiveRecord::Base
  acts_as_taggable_on :primary_keywords, :secondary_keywords
  ...
  define_index do
        indexes primary_keywords.name, :as => :primary_keywords
        indexes secondary_keywords.name, :as => :secondary_keywords
        ...
  end
end

On Aug 17, 9:13 am, James <[email protected]> wrote:
> Thanks for the feedback guys! I think I am making progress now :)
>
> On Aug 15, 3:30 am,JamesHealy <[email protected]> wrote:
>
>
>
> >Jameswrote:
> > > I'm working with 'acts_as_taggable_on' at the moment, but not really
> > > making any progress. If need be I can strip the tagging support, but
> > > I'd like to at least give it a shot.
>
> > I'm not really familiar with acts_as_taggable_on. My homebrew tagging
> > system uses a Tag model that has a name attributes. I've added the tags
> > to my indexes like so:
>
> >   define_index do
> >     ...
> >     indexes tags.name, :as => :tags
> >     has tags(:id), :as => :tag_ids
> >     ...
> >   end
>
> > Adding them as an indexed field means the users can search by tag name.
> > Adding them as an attribute means I can easily search by tag id when I
> > need precise results.
>
> > --JamesHealy <jimmy-at-deefa-dot-com>  Sat, 15 Aug 2009 11:24:42 +1000
--~--~---------~--~----~------------~-------~--~----~
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