`
JasonChi
  • 浏览: 91994 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

sphinx 1.11 +thinking-sphinx 1.4.10(<rails 3 最高配置)

阅读更多
windows版:


1.coreseek 4.0.1及安装
   http://www.coreseek.cn/news/11/52/

2.thinking-sphinx 1.4.10 下载
配置:config下创建 sphinx.yml配置文件
development: &my_settings
  enable_star: 1
  min_prefix_len: 0
  min_infix_len: 2
  min_word_len: 1
  max_results: 70000
  morphology: none
  listen: localhost:3333
  exceptions: D:/test_projects/search/log/sphinx_exception.log
  chinese_dictionary: C:/usr/local/coreseek-4.0.1-win32/etc/
  charset_type: zh_cn.utf-8
  charset_dictpath: C:/usr/local/coreseek-4.0.1-win32/etc/
  bin_path: C:/usr/local/coreseek-4.0.1-win32/bin
test:
  <<: *my_settings
production:
  <<: *my_settings


中文支持:
直接config/sphinx目录添加:
charset_type: zh_cn.utf-8
charset_dictpath: dict/path
再同样手动配置修改生成的配置文件。


lib/thinking_sphinx/configuration.rb
vendor/riddle/lib/riddle/configuration/index.rb
在上面两个文件修改。生成配置文件后就不用再修改

参考:http://www.iteye.com/topic/487608


以上配置完成以后做索引的时候可能会出现 问题,ts检测到sphinx的版本为1.11-dev,且报1.4.10不支持1.11版(ts支持1.10,但coreseek好像没有集成1.10的版本)。
so其实也很简单,找到ts相关代码,修改让其强制支持(目前没发现什么问题,不行的话换coreseek4.1 用的sphinx2.0.1也支持)

ts/lib/ts/auto_version.rb
when '0.9.8', '0.9.9'
        require "riddle/#{version}"
      [b]when /1.11/
        require 'riddle/1.10'[/b]
      when /2.0.\d/
        require 'riddle/2.0.1'
      else

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics