I followed your instructions. when i ran rake ts:start, it gave me some warnings..
WARNING: index 'blog_post_core': preload: failed to open /home/rachel/ ths/db/sphinx/development/blog_post_core.sph: No such file or directory; NOT SERVING WARNING: index 'blog_post': no such local index 'blog_post_core' - SKIPPING LOCAL INDEX WARNING: index 'blog_post': no valid local/remote indexes in distributed index - NOT SERVING this is probably the reason why BlogPost.search doesn't return anything. i checked the results when i run rake ts:in. it had this error: ERROR: index 'blog_post_core': sql_range_query: Unknown column 'type' in 'where clause' (DSN=mysql://debian-sys-maint:*...@localhost:3306/ ths_dev). i asked my colleague and this error also appears in her ts:in results. and search for her works fine. On Apr 24, 1:29 pm, Pat Allan <[email protected]> wrote: > Hmm... just to confirm, if you stop Sphinx, delete the contents of db/ > sphinx, re-index and then restart Sphinx, does that fix the issue? > > -- > Pat > > On 24/04/2009, at 3:20 PM, rachel anne wrote: > > > > > Hi Pat > > > so i got this unknown type 'mysql'; error out of the way by > > reinstalling sphinx and configuring it with mysql attached. problem is > > when i test through script/console by writing Model.search, it returns > > nothing. does this mean ts wasn't able to index my models? it works on > > my colleague's machine but doesn't work on mine. we can't figure out > > what the exact problem is. > > > here's the content of my develpment.sphinx.conf > > > indexer > > { > > } > > > searchd > > { > > address = 127.0.0.1 > > port = 3312 > > log = /home/rachel/ths/log/searchd.log > > query_log = /home/rachel/ths/log/searchd.query.log > > pid_file = /home/rachel/ths/log/searchd.development.pid > > } > > > source blog_post_core_0 > > { > > type = mysql > > sql_host = localhost > > sql_user = > > sql_pass = > > sql_db = ths_dev > > sql_query_pre = SET NAMES utf8 > > sql_query = SELECT `blog_posts`.`id` * 9 + 2 AS `id` , CAST > > (`blog_posts`.`title` AS CHAR) AS `title`, CAST(`blog_posts`.`body` AS > > CHAR) AS `body`, IFNULL(`blog_posts`.`title`, '') AS `title_sort`, > > `blog_posts`.`person_id` AS `person_id`, `blog_posts`.`blog_id` AS > > `blog_id`, UNIX_TIMESTAMP(`blog_posts`.`created_at`) AS `created_at`, > > `blog_posts`.`id` AS `sphinx_internal_id`, 1270887957 AS `class_crc`, > > '1270887957' AS `subclass_crcs`, 0 AS `sphinx_deleted` FROM > > blog_posts WHERE `blog_posts`.`id` >= $start AND > > `blog_posts`.`id` <= $end AND type = 'BlogPost' GROUP BY > > `blog_posts`.`id` ORDER BY NULL > > sql_query_range = SELECT IFNULL(MIN(`id`), 1), IFNULL(MAX(`id`), 1) > > FROM `blog_posts` > > sql_attr_uint = person_id > > sql_attr_uint = blog_id > > sql_attr_uint = sphinx_internal_id > > sql_attr_uint = class_crc > > sql_attr_uint = sphinx_deleted > > sql_attr_timestamp = created_at > > sql_attr_str2ordinal = title_sort > > sql_attr_multi = uint subclass_crcs from field > > sql_query_info = SELECT * FROM `blog_posts` WHERE `id` = (($id - > > 2) / 9) > > } > > > index blog_post_core > > { > > source = blog_post_core_0 > > path = /home/rachel/ths/db/sphinx/development/blog_post_core > > morphology = stem_en > > charset_type = utf-8 > > } > > > index blog_post > > { > > type = distributed > > local = blog_post_core > > } > > > On Apr 24, 11:34 am, Pat Allan <[email protected]> wrote: > >> When you compiled Sphinx, did you compile it for both PostgreSQL and > >> MySQL? > > >> If so, what's the contents of your development.sphinx.conf file? > >> (Without database passwords, of course). > > >> -- > >> Pat > > >> On 23/04/2009, at 8:27 PM, rachel anne wrote: > > >>> Hi > > >>> I just changed my database from postgreSQL to mySQL. My problem > >>> now is > >>> that when i run rake ts:in, i get the ff. error: > > >>> using config file '/home/rachel/ths/config/ > >>> development.sphinx.conf'... > >>> indexing index 'article_core'... > >>> ERROR: source 'article_core_0': unknown type 'mysql'; skipping. > >>> ERROR: index 'article_core': no valid sources configured; skipping. > >>> distributed index 'article' can not be directly indexed; skipping. > > >>> please help. > > >>> rachel --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
