marsh.ryanw-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Oct-06 05:25 UTC
will this approach work?
i have a theoretical question... i need search functionality sort of like Mac OSX spotlight. i was considering using ActsAsTaggable and programmatically replacing the tags for a given object every time it is saved. basically i would just dump all of the column values into tags. i don''t want dangling tags left in the tags table when objects are changed or deleted. is this possible? what problems might i run into with this? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
On 06 Oct 2006, at 07:25, marsh.ryanw-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> i have a theoretical question... i need search functionality sort of > like Mac OSX spotlight. i was considering using ActsAsTaggable and > programmatically replacing the tags for a given object every time > it is > saved. basically i would just dump all of the column values into tags. > i don''t want dangling tags left in the tags table when objects are > changed or deleted. is this possible? what problems might i run into > with this?Your main problem will be performance. On top of that, you''re duplicating a lot of data. If you want a performant model-wide search, you should look into a fulltext indexing engine like Ferret (Ruby version of Lucene) and the acts_as_ferret plugin. There are a few other fulltext search engines out there. Using such a plugin will also give you some extra features such as fuzzy searches (cfr. google''s "Did you mean...") and inclusion/exclusion (cfr. google''s "+iwantthis -butnotthis") and quite a lot of other very interesting extras. Best regards Peter De Berdt --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Thanks! -ryan On Oct 6, 2006, at 3:02 AM, Peter De Berdt wrote:> > On 06 Oct 2006, at 07:25, marsh.ryanw-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote: > >> i have a theoretical question... i need search functionality sort of >> like Mac OSX spotlight. i was considering using ActsAsTaggable and >> programmatically replacing the tags for a given object every time >> it is >> saved. basically i would just dump all of the column values into >> tags. >> i don''t want dangling tags left in the tags table when objects are >> changed or deleted. is this possible? what problems might i run into >> with this? > > Your main problem will be performance. On top of that, you''re > duplicating a lot of data. If you want a performant model-wide > search, you should look into a fulltext indexing engine like Ferret > (Ruby version of Lucene) and the acts_as_ferret plugin. There are a > few other fulltext search engines out there. Using such a plugin > will also give you some extra features such as fuzzy searches (cfr. > google''s "Did you mean...") and inclusion/exclusion (cfr. google''s > "+iwantthis -butnotthis") and quite a lot of other very interesting > extras. > > > Best regards > > Peter De Berdt > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---