I think I have enough information to move forward. I'll come back and let you know what I got to work.
Thanks, Pat! On Jun 21, 10:14 pm, Pat Allan <[email protected]> wrote: > Hi Brad > > Clemens is right - TS only looks at ActiveRecord models for index > definitions. This may change in the future (I'm currently toying with the > idea of a big rewrite), but that doesn't help you any time soon. > > So, I think you have two options: > > * Have a separate Sphinx setup for your Wordpress blog. Sphinx doesn't use a > stack of memory by itself - what takes up memory is all the attributes. > > * Adapt the rake task - insert your custom sources and indices into the end > of the file. I think if you redefine a rake task, it just calls both old and > new definitions? So just redefine thinking_sphinx:configure - that way > existing tasks and processes should still do their thing as expected. > > However, the catch with the second option is that you won't be able to search > globally across all indexed models - because TS will search the Wordpress > indices as well, and then will get confused trying to map it to a model. If > you want to search across multiple models, just make sure you specify > :classes => [ModelOne, ModelTwo]. > > To search the Wordpress site within your Rails app - in both situations - > you'll need to use Riddle, not Thinking Sphinx. > > Let us know how you go! > > Cheers > > -- > Pat > > On 22/06/2011, at 10:48 AM, Brad Heintz wrote: > > > > > > > > > The only catch with that is that my changes get clobbered every time I > > deploy. I suppose I could adapt the default rake task, though. > > > If nobody suggests anything simpler, perhaps I'll try going that > > route. Thanks, Clemens. > > > On Jun 21, 7:41 pm, Clemens Kofler <[email protected]> wrote: > >> Hey Brad, > > >> as far as I know, Thinking Sphinx itself can't generate configs for > >> different sources. I think you'll have to manually adapt the config and > >> provide Sphinx with the target database you've mentioned. > > >> I'm sure, Pat will correct me if I'm wrong. :) > > >> - C. > > >> On Wednesday, June 22, 2011 at 1:22 AM, Brad Heintz wrote: > >>> I've inherited a Rails 2 app using Thinking Sphinx (1.3.11 on top of > >>> Sphinx 0.9.8.1), deployed on EngineYard. The whole thing works > >>> perfectly: Deploying the app rebuilds the config (I guess via rake > >>> thinking_sphinx:configure) with sources for all the indexed models > >>> &c. Indexing works, searches work. No complaints, until... > > >>> My problem is this: I'd like to include an outside data source. (A > >>> WordPress blog running on a MySQL database on a different server.) Is > >>> there a way to insert an external MySQL data source into the config > >>> file when it gets built? > > >>> If I have to, I can use MySQL table-level replication to get the WP > >>> data into my Rails database, wrap some dumb models around it, and > >>> index those - but if this could be fixed at the TS config level, I'd > >>> be really psyched. > > >>> Many thanks, > >>> - Brad > > >>> -- > >>> 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] > >>> (mailto:[email protected]). > >>> To unsubscribe from this group, send email to > >>> [email protected] > >>> (mailto:[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 > > 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.
