Created
November 18, 2008 00:07
-
-
Save yury/25981 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
indexing index 'place_core'... | |
ERROR: index 'place_core': sql_range_query: Column 'context' in on clause is amb | |
iguous (DSN=mysql://root:***@localhost:3306/planet). | |
total 0 docs, 0 bytes | |
total 0.064 sec, 0.00 bytes/sec, 0.00 docs/sec | |
distributed index 'place' can not be directly indexed; skipping. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sql_query = SELECT `places`.`id` * 1 + 0 AS `id` , CAST(GROUP_CONCAT(`tags`.`name` SEPARATOR ' ') AS CHAR) AS `place_kind`, CAST(GROUP_CONCAT(`pays_kinds_places`.`name` SEPARATOR ' ') AS CHAR) AS `pays_kind`, CAST(GROUP_CONCAT(`menu_kinds_places`.`name` SEPARATOR ' ') AS CHAR) AS `menu_kind`, CAST(GROUP_CONCAT(`music_kinds_places`.`name` SEPARATOR ' ') AS CHAR) AS `music_kind`, CAST(GROUP_CONCAT(`service_kinds_places`.`name` SEPARATOR ' ') AS CHAR) AS `service_kind`, `places`.`id` AS `sphinx_internal_id`, 3051125961 AS `class_crc`, '3051125961' AS `subclass_crcs`, 0 AS `sphinx_deleted` FROM places LEFT OUTER JOIN `taggings` ON (`places`.`id` = `taggings`.`taggable_id` AND `taggings`.`taggable_type` = 'Place') LEFT OUTER JOIN `tags` ON (`tags`.`id` = `taggings`.`tag_id`) AND context = 'place_kind' LEFT OUTER JOIN `taggings` pays_kinds_places_join ON (`places`.`id` = `pays_kinds_places_join`.`taggable_id` AND `pays_kinds_places_join`.`taggable_type` = 'Place') LEFT OUTER JOIN `tags` pays_kinds_places ON (`pays_kinds_places`.`id` = `pays_kinds_places_join`.`tag_id`) AND context = 'pays_kind' LEFT OUTER JOIN `taggings` menu_kinds_places_join ON (`places`.`id` = `menu_kinds_places_join`.`taggable_id` AND `menu_kinds_places_join`.`taggable_type` = 'Place') LEFT OUTER JOIN `tags` menu_kinds_places ON (`menu_kinds_places`.`id` = `menu_kinds_places_join`.`tag_id`) AND context = 'menu_kind' LEFT OUTER JOIN `taggings` music_kinds_places_join ON (`places`.`id` = `music_kinds_places_join`.`taggable_id` AND `music_kinds_places_join`.`taggable_type` = 'Place') LEFT OUTER JOIN `tags` music_kinds_places ON (`music_kinds_places`.`id` = `music_kinds_places_join`.`tag_id`) AND context = 'music_kind' LEFT OUTER JOIN `taggings` service_kinds_places_join ON (`places`.`id` = `service_kinds_places_join`.`taggable_id` AND `service_kinds_places_join`.`taggable_type` = 'Place') LEFT OUTER JOIN `tags` service_kinds_places ON (`service_kinds_places`.`id` = `service_kinds_places_join`.`tag_id`) AND context = 'service_kind' WHERE `places`.`id` >= $start AND `places`.`id` <= $end GROUP BY `places`.`id` ORDER BY NULL | |
sql_query_range = SELECT MIN(`id`), MAX(`id`) FROM `places` | |
sql_query_info = SELECT * FROM `places` WHERE `id` = (($id - 0) / 1) | |
sql_attr_uint = sphinx_internal_id | |
sql_attr_uint = class_crc | |
sql_attr_multi = uint subclass_crcs from field | |
sql_attr_uint = sphinx_deleted | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Place < ActiveRecord::Base | |
acts_as_taggable_on :place_kind | |
acts_as_taggable_on :menu_kind | |
acts_as_taggable_on :music_kind | |
acts_as_taggable_on :service_kind | |
define_index do | |
indexes place_kind.name, :as => :place_kind | |
indexes pays_kind.name, :as => :pays_kind | |
indexes menu_kind.name, :as => :menu_kind | |
indexes music_kind.name, :as => :music_kind | |
indexes service_kind.name, :as => :service_kind | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment