Hi Krishnaprasad

Can you provide your full index definition? Also, what's the sql_query value 
for your user_core_0 source in config/development.sphinx.conf?

Cheers

-- 
Pat

On 23/03/2011, at 4:21 AM, Krishnaprasad Varma wrote:

> Hi i have a user model which has_many snippets where snippets is the 
> inherited by photos and videos 
> 
> Class User  < ActiveRecord::Base
> 
>   has_many :snippets, :class_name=>"Snippet::Base"
>   has_many :photos, :class_name=>"Snippet::Photo"
>   has_many :videos, :class_name=>"Snippet::Video"
> 
>   define_index do
> 
>     indexes videos.description, :as=>:video_desc
>     indexes photos.description, :as=>:photo_desc
>   end
> 
> end
> 
> class Snippet::Base  < ActiveRecord::Base
>     ## has title and description and user_id
>    belongs_to :user
> end
> 
> class Snippet::Photo  < Snippet::Base
> end
> class Snippet::Video  < Snippet::Base
> end
> 
> Also i only need to index the photo snippet and not video snippet . 
> and also "index snippets.description, :as=>:snippet_desc"
> 
> when i rebuild the index its throwing error
> 
> ERROR: index 'user_delta': sql_range_query: You have an error in your SQL 
> syntax; check the manual that corresponds to your MySQL server version for 
> the right syntax to use near 'AS `rc_desc`, `user_snippets`.`description` AS 
> `video_desc`, `videos_users`.`desc' at line 1 
> (DSN=mysql://root:***@localhost:3306/stag).
> 
> Thanks in advacne
> 
> 
> 
> 
> -- 
> 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.

Reply via email to