I am trying to switch to Thinking Sphinx from Ultrasphinx and having
some very basic problems.
I have a class:
class Film < ActiveRecord::Base
define_index do
indexes :title, :as => :title_en, :sortable => true
indexes title_es(:title), :as => :spanish_title
indexes synopses.synopsis, :as => :synopsis
has created_at, updated_at
end
has_many :synopses
has_one :title_es, :class_name => "TranslatedTitle", :conditions =>
"language = 'es'"
end
When I run rake thinking_sphinx:configure I get a conf file that seems
just plain wrong!
Here is the sql query:
sql_query = SELECT `films`.`id` * 1 + 0 AS `id` , CAST
(`films`.`title` AS CHAR) AS `title_en`, CAST(`films`.`title` AS CHAR)
AS `spanish_title`, CAST(`films`.`synopsis` AS CHAR) AS `synopsis`,
`films`.`id` AS `sphinx_internal_id`, 578162972 AS `class_crc`,
'578162972' AS `subclass_crcs`, 0 AS `sphinx_deleted`, IFNULL
(`films`.`title`, '') AS `title_en_sort`, UNIX_TIMESTAMP
(`films`.`created_at`) AS `created_at`, UNIX_TIMESTAMP
(`films`.`updated_at`) AS `updated_at` FROM `films` WHERE
`films`.`id` >= $start AND `films`.`id` <= $end GROUP BY `films`.`id`
ORDER BY NULL
it is not looking at any associated classes, but thinking that the
fields are on Film itself!
This conf file, obviously, doesn't run against sphinx as there is no
synopsis field and it gives me duplicate titles.
I am sure I am doing something very basic and stupid, but right now I
can't see what!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---