It does look better, but may not work with 1.1.15 - if you can upgrade, I recommend it.
-- Pat On 15/03/2010, at 6:55 AM, tilt wrote: > Thanks Pat, > > I'm using TS 1.1.15. > > The class_crc condition is now working as well, when I tried it at > first I had forgotten to set up an index on the type column. I'll now > try the :classes option as it looks better in the code. > > Cheers > > > On 12 Mrz., 06:42, Pat Allan <[email protected]> wrote: >> You should be able to use the :classes option to get the results for >> specific classes: >> >> ThinkingSphinx.search 'foo', :classes => [Spider] >> >> But, given you're using the old syntax (ThinkingSphinx::Search.search) - >> what version of Thinking Sphinx are you using? >> >> -- >> Pat >> >> On 08/03/2010, at 7:52 AM, tilt wrote: >> >>> Hi, >> >>> I've been trying to make the Sphinx filter my search results - call >>> them animals - by their subclass, e.g. spiders. >> >>> ...I've tried >> >>> 1.) filtering by the column that tells Rails of which class the given >>> dataset is by setting up an index on type (with or without an alias) >>> and adding :type => "Spider" to the search conditions (either to the >>> "conditions" or the "with" hash) >> >>> 2.) filtering by class using the condition ":class_crc => >>> Spider.to_crc32" in the "with" hash which is passed to the >>> ThinkingSphinx::Search.search method >> >>> Nothing worked out unfortunately, nor could I find any solutions on >>> the web or in this mailing list. >> >>> Is there a common way to deal with STI using the TS plugin? >> >>> Thanks for help! >> >>> Best regards >> >>> -- >>> 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 >>> athttp://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. > -- 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.
