Hi Pat, In the conf file, sql query value is " SELECT SQL_NO_CACHE `profiles`.`id` * 1 + 0 AS `id` , CAST(`profiles`.`preferred_name` AS CHAR) AS `pname`, CAST(`profile_attributes`.`name` AS CHAR) AS `name`, CAST(`ethnicity_types`.`name` AS CHAR) AS `name`, CAST(`religions_profiles`.`name` AS CHAR) AS `name`, CAST(`smokings_profiles`.`name` AS CHAR) AS `name`, CAST(`drinkings_profiles`.`name` AS CHAR) AS `name`, CAST(`occupations_profiles`.`name` AS CHAR) AS `name`, CAST(`universities_profiles`.`name` AS CHAR) AS `name`, CAST(`schools_profiles`.`name` AS CHAR) AS `name`, CAST(`body_types_profiles`.`name` AS CHAR) AS `name`, CAST(`hair_colors_profiles`.`name` AS CHAR) AS `name`, CAST(`eye_colors_profiles`.`name` AS CHAR) AS `name`, CAST(`skin_colors_profiles`.`name` AS CHAR) AS `name`, CAST(`political_views_profiles`.`name` AS CHAR) AS `name`, CAST(`family_orientations_profiles`.`name` AS CHAR) AS `name`, CAST(`workout_frequencies_profiles`.`name` AS CHAR) AS `name`, CAST(`diet_types_profiles`.`name` AS CHAR) AS `name`, CAST(`profile_works`.`company_name` AS CHAR) AS `company_name`, CAST(GROUP_CONCAT(DISTINCT IFNULL(`workout_types_profiles`.`name`, '0') SEPARATOR ' ') AS CHAR) AS `name`, CAST(GROUP_CONCAT(DISTINCT IFNULL(`interest_attributes`.`name`, '0') SEPARATOR ' ') AS CHAR) AS `name`, CAST(GROUP_CONCAT(DISTINCT IFNULL(`entertainments_profiles`.`name`, '0') SEPARATOR ' ') AS CHAR) AS `name`, CAST(GROUP_CONCAT(DISTINCT IFNULL(`foods_profiles`.`name`, '0') SEPARATOR ' ') AS CHAR) AS `name`, CAST(GROUP_CONCAT(DISTINCT IFNULL(`music_types_profiles`.`name`, '0') SEPARATOR ' ') AS CHAR) AS `name`, CAST(GROUP_CONCAT(DISTINCT IFNULL(`watching_sports_profiles`.`name`, '0') SEPARATOR ' ') AS CHAR) AS `name`, CAST(GROUP_CONCAT(DISTINCT IFNULL(`playing_sports_profiles`.`name`, '0') SEPARATOR ' ') AS CHAR) AS `name`, CAST(GROUP_CONCAT(DISTINCT IFNULL(`languages_profiles`.`name`, '0') SEPARATOR ' ') AS CHAR) AS `name`, `profiles`.`id` AS `sphinx_internal_id`, 1323996051 AS `class_crc`, '1323996051' AS `subclass_crcs`, 0 AS `sphinx_deleted` FROM `profiles` LEFT OUTER JOIN `profile_attributes` ON `profile_attributes`.id = `profiles`.ethnicity_id AND (`profile_attributes`.`type` = 'Ethnicity' ) LEFT OUTER JOIN `ethnicity_types` ON `ethnicity_types`.id = `profiles`.ethnicity_type_id LEFT OUTER JOIN `profile_attributes` religions_profiles ON `religions_profiles`.id = `profiles`.religion_id AND (`religions_profiles`.`type` = 'Religion' ) LEFT OUTER JOIN `profile_attributes` smokings_profiles ON `smokings_profiles`.id = `profiles`.smoking_id AND (`smokings_profiles`.`type` = 'Smoking' ) LEFT OUTER JOIN `profile_attributes` drinkings_profiles ON `drinkings_profiles`.id = `profiles`.drinking_id AND (`drinkings_profiles`.`type` = 'Drinking' ) LEFT OUTER JOIN `profile_attributes` occupations_profiles ON `occupations_profiles`.id = `profiles`.occupation_id AND (`occupations_profiles`.`type` = 'Occupation' ) LEFT OUTER JOIN `profile_attributes` universities_profiles ON `universities_profiles`.id = `profiles`.university_id AND (`universities_profiles`.`type` = 'University' ) LEFT OUTER JOIN `profile_attributes` schools_profiles ON `schools_profiles`.id = `profiles`.school_id AND (`schools_profiles`.`type` = 'School' ) LEFT OUTER JOIN `profile_attributes` body_types_profiles ON `body_types_profiles`.id = `profiles`.body_type_id AND (`body_types_profiles`.`type` = 'BodyType' ) LEFT OUTER JOIN `profile_attributes` hair_colors_profiles ON `hair_colors_profiles`.id = `profiles`.hair_color_id AND (`hair_colors_profiles`.`type` = 'HairColor' ) LEFT OUTER JOIN `profile_attributes` eye_colors_profiles ON `eye_colors_profiles`.id = `profiles`.eye_color_id AND (`eye_colors_profiles`.`type` = 'EyeColor' ) LEFT OUTER JOIN `profile_attributes` skin_colors_profiles ON `skin_colors_profiles`.id = `profiles`.skin_color_id AND (`skin_colors_profiles`.`type` = 'SkinColor' ) LEFT OUTER JOIN `profile_attributes` political_views_profiles ON `political_views_profiles`.id = `profiles`.political_view_id AND (`political_views_profiles`.`type` = 'PoliticalView' ) LEFT OUTER JOIN `profile_attributes` family_orientations_profiles ON `family_orientations_profiles`.id = `profiles`.family_orientation_id AND (`family_orientations_profiles`.`type` = 'FamilyOrientation' ) LEFT OUTER JOIN `profile_attributes` workout_frequencies_profiles ON `workout_frequencies_profiles`.id = `profiles`.workout_frequency_id AND (`workout_frequencies_profiles`.`type` = 'WorkoutFrequency' ) LEFT OUTER JOIN `profile_attributes` diet_types_profiles ON `diet_types_profiles`.id = `profiles`.diet_type_id AND (`diet_types_profiles`.`type` = 'DietType' ) LEFT OUTER JOIN `profile_works` ON profile_works.profile_id = profiles.id LEFT OUTER JOIN `profile_healths` ON (`profiles`.`id` = `profile_healths`.`profile_id` AND `profile_healths`.`healthable_type` = 'WorkoutType') LEFT OUTER JOIN `profile_attributes` workout_types_profiles ON (`workout_types_profiles`.`id` = `profile_healths`.`healthable_id`) AND (`workout_types_profiles`.`type` = 'WorkoutType' ) LEFT OUTER JOIN `profile_interests` ON (`profiles`.`id` = `profile_interests`.`profile_id` AND `profile_interests`.`interestable_type` = 'Activity') LEFT OUTER JOIN `interest_attributes` ON (`interest_attributes`.`id` = `profile_interests`.`interestable_id`) AND (`interest_attributes`.`type` = 'Activity' ) LEFT OUTER JOIN `profile_interests` entertainments_profiles_join ON (`profiles`.`id` = `entertainments_profiles_join`.`profile_id` AND `entertainments_profiles_join`.`interestable_type` = 'Entertainment') LEFT OUTER JOIN `interest_attributes` entertainments_profiles ON (`entertainments_profiles`.`id` = `entertainments_profiles_join`.`interestable_id`) AND (`entertainments_profiles`.`type` = 'Entertainment' ) LEFT OUTER JOIN `profile_interests` foods_profiles_join ON (`profiles`.`id` = `foods_profiles_join`.`profile_id` AND `foods_profiles_join`.`interestable_type` = 'Food') LEFT OUTER JOIN `interest_attributes` foods_profiles ON (`foods_profiles`.`id` = `foods_profiles_join`.`interestable_id`) AND (`foods_profiles`.`type` = 'Food' ) LEFT OUTER JOIN `profile_interests` music_types_profiles_join ON (`profiles`.`id` = `music_types_profiles_join`.`profile_id` AND `music_types_profiles_join`.`interestable_type` = 'MusicType') LEFT OUTER JOIN `interest_attributes` music_types_profiles ON (`music_types_profiles`.`id` = `music_types_profiles_join`.`interestable_id`) AND (`music_types_profiles`.`type` = 'MusicType' ) LEFT OUTER JOIN `profile_interests` watching_sports_profiles_join ON (`profiles`.`id` = `watching_sports_profiles_join`.`profile_id` AND `watching_sports_profiles_join`.`interestable_type` = 'WatchingSport') LEFT OUTER JOIN `interest_attributes` watching_sports_profiles ON (`watching_sports_profiles`.`id` = `watching_sports_profiles_join`.`interestable_id`) AND (`watching_sports_profiles`.`type` = 'WatchingSport' ) LEFT OUTER JOIN `profile_interests` playing_sports_profiles_join ON (`profiles`.`id` = `playing_sports_profiles_join`.`profile_id` AND `playing_sports_profiles_join`.`interestable_type` = 'PlayingSport') LEFT OUTER JOIN `interest_attributes` playing_sports_profiles ON (`playing_sports_profiles`.`id` = `playing_sports_profiles_join`.`interestable_id`) AND (`playing_sports_profiles`.`type` = 'PlayingSport' ) LEFT OUTER JOIN `languages_spoken` ON `languages_spoken`.profile_id = `profiles`.id LEFT OUTER JOIN `profile_attributes` languages_profiles ON `languages_profiles`.id = `languages_spoken`.language_id AND (`languages_profiles`.`type` = 'Language' ) WHERE `profiles`.`id` >= $start AND `profiles`.`id` <= $end GROUP BY `profiles`.`id` ORDER BY NULL"
On Jun 26, 11:12 am, Pat Allan <[email protected]> wrote: > Hi Arun > > In your config/development.sphinx.conf file, you'll find the profile_core_0 > source - what's the sql_query value in that source? > > -- > Pat > > On 26/06/2010, at 3:38 PM, Arun wrote: > > > > > Hi, > > I want retrieve the company name in the profile model but due to > > relationship ,it is not get indexed. > > > I am using the Profile model for indexes > > 1.In the profile model > > belongs_to :user > > 2. In the user model > > belongs_to :address, :dependent => :destroy > > 3. In the address model > > belongs_to :country > > so i given the indexes like this > > indexes user.address.country.name but it is throwing error like this > > "indexing index 'profile_core'... > > ERROR: index 'profile_core': sql_range_query: Unknown column > > 'profiles.name' in 'field list' (DSN=mysql://root:*...@localhost:" > > > -- > > 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 > > athttp://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.
