Nice! Thanks for the example searches! On Oct 12, 6:44 am, Timo Virkkala <[email protected]> wrote: > Hi, > > Everything you've described so far is quite possible with TS. I'm > doing something quite similar at the moment and TS is handling theSTI > situation fine. > > After you define your index on Magazine, you can do any of the following: > > Magazine.search(phrase) # Searches both kinds of magazines > DigitalMag.search(phrase) # Searches only digital mags > PaperMag.search(phrase) # Searches only paper mags > ThinkingSphinx.search(phrase) # Searches all of your indexed models > ThinkingSphinx.search(phrase, :classes => [DigitalMag, PaperMag]) > > -T- > > > > > > > > On Tue, Oct 11, 2011 at 17:39, cec <[email protected]> wrote: > > Hi! > > > I'm writing a small rails3 apps ecosystem at work and I'm already > > using TS on some of them. > > > For the app I am working on now, I have to manage a catalog of both > > digital and paper magazines. > > The two share various fields, but at the same time they quite differ > > in various logic aspects. > > These are the models I would use: > > > Magazine < AR:Base > > DigitalMag < Magazine > > PaperMag < Magazine > > > Users need to be able to search for digitals, paperMags or both. > > > The columns that have to be searched on are shared between the two > > kinds of magazines, so I would define only an index in Magazine, > > hoping that its children "inherit" the index. > > Is it possible to do so with TS at the moment? > > > I know this is all trivial stuff, but I think it is always better to > > be exhaustive when describing one's needs. > > > -- > > 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.
