Hi;
I am new to ThinkingSphinx (coming from IndexTank). Except for two issues, 
it has been a smooth transition

Issue 1: HABTM

I have this model

class Item < ActiveRecord::Base
>   has_and_belongs_to_many :groups
>  define_index do
>     indexes title
>     indexes body
>     has groups(:id), :as => :groups
>  end
>  Item.search(searchstring, :page => page,:conditions => {:groups => group)
>  # I pass a group id into the search 
> end


I keep getting this error 

> ActionView::Template::Error (index item_core: query error: no field 
> 'groups' found in schema):


I have tried has groups(:id), :as => :group_ids.

Nothing fixes the issue.

My second issue is how to test locally. I am deploying to heroku with 
flyingsphinx but I don't seem to be able to run tests with my local ts 
instance and it seems strange to have to push code to production to rerun 
the index to be able to test the changes.

Any advice is appreciated!

Alan

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/thinking-sphinx/-/xStJo722WZAJ.
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.

Reply via email to