Ethan wrote:

The problem is that the generated sphinc config file is incomplete, it
doesn't look like a path issue at all.

> I'm only trying to index one model. I have it set up like this:
> 
> class Entry < ActiveRecord::Base
>   belongs_to :user
> 
>   define_index do
>     indexes(title)
>     indexes(entry)
> 
>     has CAST(user_id AS INT), :type => :integer, :as => :user_id
>     has created_at
>     has updated_at
>   end
> end

Why are you casting user_id to an int? Is it stored as a string in your
database?

I'd remove the cast if at all possible, or wrap it in quotes. Thinking
Sphinx is pretty good at detecting the database type.

    has user_id

or

    has "CAST(user_id AS INT)", :type => :integer, :as => :user_id

-- James Healy <[email protected]>  Mon, 09 Nov 2009 09:08:08 +1100

--~--~---------~--~----~------------~-------~--~----~
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