Answered this on Github, but for anyone else reading here:

When the model name is namespaced, the trick is to pass through a string with a 
slash as the namespace separator:

 ThinkingSphinx::Index.define 'spree/product', :with => :active_record do

On 26 Jan 2014, at 10:31 pm, Corni <[email protected]> wrote:

> Hello,
> I can't figure out how to index over a model which is defined in a gem I use 
> (Spree) like this:
> 
> module Spree
>   class Product < ActiveRecord::Base
>     ...
>   end
> end
> 
> So usually I would use Spree::Product to use the model. But TS uses this 
> syntax
> 
>      ThinkingSphinx::Index.define :product ... (if the model was "Product")
> 
> How can I change it to use the Spree::Product model and not search for a 
> Product model in my own app? 
> Thanks so much for help!
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Thinking Sphinx" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/thinking-sphinx.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/thinking-sphinx.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to