Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

ruby on rails - do i need to reinstall thinking sphinx for mysql if it was previously installed for postgres? -


i installed sphinx couple of months postgres project , have project uses mysql. tried remedy this line in environments.rb:

thinkingsphinx.database_adapter = :mysql 

and generated development.sphinx.conf project:

source article_core_0 {   type = mysql   sql_host = localhost   sql_user = ***   sql_pass = ***   sql_db = ***_development   sql_sock = /tmp/mysql.sock   sql_query_pre = update `articles` set `delta` = 0 `delta` = 1   sql_query_pre = set names utf8   sql_query_pre = set time_zone = '+0:00'   sql_query = select sql_no_cache `articles`.`id` * 6 + 0 `id` , `articles`.`title` `title`, `articles`.`content` `content`, group_concat(distinct ifnull(`tags`.`tag`, '0') separator ' ') `tag`, group_concat(distinct ifnull(`customer_categories`.`name`, '0') separator ' ') `category`, concat_ws(' ', `users`.`first_name`, `users`.`last_name`) `created_by_user_name`, `articles`.`id` `sphinx_internal_id`, 3448190970 `class_crc`, 0 `sphinx_deleted`, `articles`.`account_id` `account_id`, `articles`.`internal_only` `internal_only`, unix_timestamp(`articles`.`created_at`) `created_at`, unix_timestamp(`articles`.`updated_at`) `updated_at`, `articles`.`views` `views` `articles` left outer join `articles_tags` on `articles_tags`.`article_id` = `articles`.`id` left outer join `tags` on `tags`.`id` = `articles_tags`.`tag_id` left outer join `articles_categories` on `articles_categories`.`article_id` = `articles`.`id` left outer join `customer_categories` on `customer_categories`.`id` = `articles_categories`.`customer_category_id` left outer join `users` on `users`.`id` = `articles`.`created_by_id` (`articles`.`id` >= $start , `articles`.`id` <= $end , `articles`.`delta` = 0) group `articles`.`id`, `articles`.`title`, `articles`.`content`, `users`.`first_name`, `users`.`last_name`, `articles`.`id`, `articles`.`account_id`, `articles`.`internal_only`, `articles`.`created_at`, `articles`.`updated_at`, `articles`.`views` order null   sql_query_range = select ifnull(min(`id`), 1), ifnull(max(`id`), 1) `articles` `articles`.`delta` = 0   sql_attr_uint = sphinx_internal_id   sql_attr_uint = class_crc   sql_attr_uint = sphinx_deleted   sql_attr_uint = account_id   sql_attr_uint = views   sql_attr_bool = internal_only   sql_attr_timestamp = created_at   sql_attr_timestamp = updated_at   sql_query_info = select * `articles` `id` = (($id - 0) / 6) } 

problem keep getting error:

sphinx 0.9.9-rc2 (r1785) copyright (c) 2001-2009, andrew aksyonoff  using config file '/users/eumir/rails_apps/hivemind/config/development.sphinx.conf'... indexing index 'article_core'... error: source 'article_core_0': unknown type 'mysql'; skipping. error: index 'article_core': failed configure of sources, not index. indexing index 'article_delta'... error: source 'article_delta_0': unknown type 'mysql'; skipping. error: index 'article_delta': failed configure of sources, not index. distributed index 'article' can not directly indexed; skipping. indexing index 'contact_core'... error: source 'contact_core_0': unknown type 'mysql'; skipping. 

any on this?

it looks you've compiled sphinx support postgresql, not mysql. you'll need recompile , reinstall sphinx. won't need change in thinking sphinx, it's matter of modifying database.yml (which i'm guessing you've done), , should fine.

keep in mind default, sphinx compiles mysql support only. compile both mysql , postgresql, , configure request within sphinx source directory looks like:

./configure --with-pgsql 

hopefully that's that's needed - unless have mysql set in non-standard location, may need check other flags - run ./configure --help see various options.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -